Add additional check to not SIGSEV when filenames are invalid in the fil...

...elist.txt. Also fix some compiler warnings. 

Saw this when having a wrong filename in filelist.txt during replacing audio files in gme files.