Swapped str for basestring...

...else unicode not matched
Merge pull request #387 from psav/fix_sd_elements

Swapped str for basestring...