add encode('utf-8') accidently removed in 212f19b

this restores compatibility with python3.
fixes afflux/pure-python-otr#50
Merge pull request #51 from tribut/fix-50

add encode('utf-8') accidently removed in 212f19b