Python 3 compatibility fixes.

Signed-off-by: Richard Borcsik <richard@borcsik.com>
Merge pull request #4 from randomchars/master

Python 3 fixes