Add support for Python 3

I added python 3 support. It was pretty easy, but I needed to include a new dependency, which I hope if okay.

I also cherry picked a commit from @lraucy to fix the tests so I could make sure my fix didn't break anything.