lib: make write() accept a string argument

`stream.write("convert me")` now works. Previously, only buffers were
accepted.
lib: remove extraneous convert() argument