Change / to // (integer division) in several places

This fixes a bunch of bugs and test failures in Python 3, which uses
"true division" for /
Merge pull request #10 from msabramo/use_integer_division_for_py3

Change / to // (integer division) in several places