Add support for python 3

The unicode function is not in python 3 as string literals are by
default unicode strings.

see:
http://www.diveintopython3.net/porting-code-to-python-3-with-2to3.html#unicode