tests for ByteString type

Potential fixes for #59 and #32