Fixed linux compatibility

The scripts did not run out of the box on Linux. This commit will make the scripts compatible with Windows and Linux.
I'm very new to python, so you might want to double check this ;)