Check against basestring.

This allows us to assign unicode strings with these properties.

Prior to this, if you passed a unicode string in it would be split as
if it were a list.
Merge pull request #34 from MITRECND/dir_fix

Check against basestring.

Approved by: Murad