Attempting to rewrite illegal file check into legal file check

It's not working so well right now. :\
Convert illegal file check to more cross-platform legal file check,

still works the same way, needs a bit of testing,
Also added process to automatically convert all file extensions to
uppercase per LEGO.JAM format requirements.
Fixed removal of LEGOMSC
Remove the folder illegal files were in if it is empty
Fix bug in detecting UCS-2-LE encoding

Found in @le717/LDR-Importer#37
Merge pull request #22 from le717/legal_file_check

Rewrite illegal file check, uppercase conversion, encoding check bug fix