FIX various python 3 compat fixes
Merge pull request #19 from ogrisel/python3-fixes

FIX various python 3 compat fixes