Use basestring, and allow shim for Python3 later.
Merge branch 'bugfix/use-basestring' into feature/debian-binary-integration