Converted the script to python3 while keeping compatibility with python2
Merge pull request #11 from jarondl/python3-compatibility

Converted the script to python3 while keeping compatibility with python2