Python 3 support

Mostly fixes related to integer divisions and bytes/str stricter separation.

I haven't tested this in production but I'm able to graph a whisper file in python 3, which is encouraging.