Python3 compatibility work for basestring type

This is the method described at http://stackoverflow.com/questions/4232111/stringtype-and-nonetype-in-python3-x
switch to 'six' module for python 2/3 compatibility
Merge pull request #38 from stonebig/patch-3

Python3 compatibility work for basestring type