Swapped str for basestring...

...else unicode not matched