Use of six.text type in isinstance

As reported in #63, there are a couple places where `isinstance(varname, six.text_type)` is called. This is ok on Python 3, but not on Python 2.

This patch fixes the issue. I don't quite understand the format of the included test architecture, so I created a standalone test; included. 

All 26941 tests pass on Python 2.7.5+ and 3.2.4 on Debian Jessie.