Fixes #8 Test writing binary data