- implemented a basestring fallback for python 3

Also self-explanatory. In contrast to m original py3 branch, I've decided to localize the definition of basestring. As such, modules needed only add a single import, rather than repeating the try/except block everywhere.

PS - This is *not* a monkey patch! ;-)