Python 3 compatibility

There is no basestring in python 3. Also, surround print call params in ()s.