Allow sending binary data through `write`

This came up here https://groups.google.com/forum/?hl=en#!topic/julia-users/2uq4hUJlkqg