check for instance of basestring instead of string
Merge pull request #52 from JensTimmerman/fix_run

check for instance of basestring instead of string