Unicode compat

Fixes one of the issues raised in VisTrails/VisTrails#21
This is a less than minimal change, but I would do a
```
text = six.text_type(text)
```

at the top of this block.