fix for py3 basestring problem with six