Attempt to make this module compatible with both python 2 and python 3

I've been playing with your module for a personal project where I'm using python 3. Using the future module I've attempted to make the module compatible both with python 2 and python 3. I confess this is my first shot at something like this, and half the reason I'm using Python 3 for the project is so I can learn to be a bit less python 2 centric!

As best I can tell everything still works in both versions so I wondered if you'd be interesting merging. Downside is that you'd have an extra module in the requirements and the hybrid code is a bit wacky.