Use bytearrays in tests. Fixes #1