self._write wants a unicode string on python 2

Following #1 (cc @avaris)