Several things:

* Back up src to dest, not to dest/src.
* Check invariants like "we should copy as many bytes to the output as
  we do the hash."
* Add some logging statements, because I'm hunting down a weird bug I
  don't understand very well yet.