Python 2 and 3

Changes to work in Python 2 and 3. Added some changes from Andrew Miller’s https://bitbucket.org/Milla/fonttools
Todo: bytes, strings and unicode strings.