Fix DATrie support under Python 2.

This is a simple issue of using `str` to refer to what should be
`six.text_type`.
fixup! Add diff to error messages from treewalker tests.