make the script work on linux

This is needed to make the script work on a Linux/Unix-like OS. Should test on windows before merging.
Merge pull request #2 from jadar/patch-1

make the script work on linux