013 marshalbinary

Fix bugs in binary marshal/unmarshal code and tests.
d