Added 3.x compat
Merge pull request #4 from ntzrmtthihu777/master

Added 3.x compat. Tested to work on 2.6 as well using the deadsnakes repo in Ubuntu. Note: future versions may want to use the Python 'six' module to maintain compatibility with older 2.x