Fix the mmap resize to use the correct size.

Previously the DB was calculating a minimum mmap size but using the wrong variable after it calculated the size. This commit changes the DB to use the correct variable.

Thanks to @cespare for catching the bug.

Fixes #54.