Pads zeros in toBytes output, fixes #121

This adds an immediate (but preliminary) fix for #121 until I can submit the pull request for the stricter constructors code.

Basically just re-applying 24881584c721adc268fbd8c58f57e04fb82c5a08 to the newer code base.