Forgot to write lengths to leaf page.

Forgot to actually write the lengths out to the leaf page.

See #137.
Expose shadowed variable in `readJSON`.

The `length` was shadowed and using a `length` that was in the class
scope giving records a consistently wrong length.

See #137.