Fixed a unicode error in xep_0065 on Python 3

Related to issue #296. I haven't tested on Python 2 to verify this doesn't break anything. Even with this patch, I still cannot transfer files via the proxy because of another error in the thirdparty/socks module.