Record apparent writes to scratch mem during SIOC* ioctls, and fix check...

...summing and memory-dumping code.

Resolves #876.