Fix basestring check to work with both 2.x and 3
Merge pull request #1 from 1stvamp/fix-python-3-compatiblity

Fix basestring check to work with both 2.x and 3