Fix compatibility to Python 3
Merge pull request #4 from uranusjr/py3

Fix compatibility to Python 3. Thanks @uranusjr