Fix error complaining about null bytes in string

Error was "TypeError: must be encoded string without NULL bytes, not str"

Unicode seems to have been the cause.

I don't know if this is specific to my environment. I'm running debian squeeze with a custom build of python 2.7, so that may have contributed to the issue.