Fixes #65 by making code python 3 compatible

I used pyflake3 to check and some remaining issues are dealt with
in #66.
Bump version number to 0.5.4