Port to Python 3.3

Tested under:
- python 2.6
- python 2.7
- python 3.3

Compatibility added using 'six' lib