Python3 support

Add Python 3 support: Ran python 2to3 and fixed issues with unicode literals.