Add Python 3 support

I haven't thoroughly tested this out but on the surface everything I used it for works. convert() was just ran through 2to3.