Regression test for TypeError while saving Bytes

Inspired by @AndrewPashkin's pull request (#3)