python 3 compatibility update

Cast strings and encode checksums explicitly for python3.
Merge branch 'master' of https://github.com/graham13/codepy