Basic Python 3 compatibility

Works, but hasn't received quite as much testing as I'd like.
Merge pull request #9 from JNRowe/feat/python3

Basic Python 3 compatibility