pyversion: minor fixes to exc_to_unicode

In Python 3, just str() the argument and return.  In other Python
implementations, work a little harder to make sure that we return a
unicode string.