Added support for python 3

I've made a couple of changes to make it work with python 3.
I'm using six (https://pypi.python.org/pypi/six) to support both python 2 and 3, so that's an added dependency to the package now.