Make the script compatible with python 3 as well
Merge pull request #5 from mathieui/master

Make the script compatible with python 3 as well