Don't open directories as if they were files

Fixes crash when selecting a folder in the level selector on Linux.

fopen() is only expected to work on files, and since it's called
tolerantFOpen() it may as well be tolerant to trying to open directories
as if they were files.

Fix tested on Windows and Linux