Basic Python 3 compatibility

Works, but hasn't received quite as much testing as I'd like.  Nor sure how interested in supporting Python 3 you are, but figured I'd open a PR to gauge your interest.

Thanks,

James