Use six and add support for python3