Bugfix/use basestring

This is based on the previous pull request -- change String type to `unicode` rather then `str`