Fix for python 3.x

Hey,
so I tried to install your code for python 3 using pip, but it gave me some errors.
It was really easy to fix and it at least still works with python 2.7, haven't tested it with anything else.