Turn strings in headers into bytes. Necessary for Py3 compatibility. (#461)

* Turn strings in headers into bytes. Necessary for Py3 compatibility.
Has no effect in Py2, where str == bytes.
* Add a test for the string packing in headers.
14 files changed