Linux & legacy fixes

I wanted to extract this guy: `http://steamcommunity.com/sharedfiles/filedetails/?id=135509255` on Linux, and needed to make these small changes to fit my use case.

Let me know what you think.