Implemented write() that stends a string
Convert Ruby string into const unsignec char buffer