Change sanitization check for `ExportDataAsCode` (#3837)
* Change sanitization check for `ExportDataAsCode`
I opted to use `isalnum` function since it should handle most cases. It
cannot however handle cases of files beginning with numbers.
* Update `ExportDataAsCode` condition
* Reinsert comment on `ExportDataAsCode`