Fix py3 compatibility issues

Fix errors that made vroom unusable under python3.

@Soares maintained python3 compatibility originally, but a few recent changes introduced compatibility problems.