python3 compatibility fixes
Merge pull request #140 from rpodgorny/python3

python3 compatibility fixes