Python 3 support

Converted everything to run on Python 2 and Python 3. Mainly print statements and relative vs absolute imports. Tested on versions 2.7 and 3.2.