lua version detection of the game would trigger even if conf.lua wasn't present
Switched from bc to an awk function
Escapes paths to prevent errors when filename contains special chars
Removes __MACOSX