Python3 compatibility

This PR adds support for Python3 and maintains Python2.7 support with six and __future__