Make rootPath if it doesn't exist, and ensure that it's a directory.
Make rootPath if it doesn't exist, and ensure that it's a directory.

Also, wrap errors when writing in WriteError instances.

Morgul/trivialdb,boneskull/trivialdb,trivialsoftware/trivialdb