Fix py3k portability issues
Merge branch 'master' of https://github.com/gmatteo/pymatgen