checking for basestring in base module __builtin__ (renamed to builtins in Py3)

This should solve the problem with previous pull request, documented in #79.  Thanks!