Add python3

Adds support for python3 while maintaining python 2.6 and 2.7 support. Assuming I did all the encoding/decoding correctly.