Python 3 support

This is a really awesome module! A couple simple changes and it works with python 3.