Switched usage of `str()` to `six.text_type()`

Removed unused import