Update encoding on socket.write

Make socket.write use same encoding as socket.setEncoding.
Merge pull request #5 from danielburhans/master

Missing Char encoding type on socket.write()