Adds a unit test for the filesystem based storage system, and fixes
minor issues that came to light during the development of the unit
tests.

References #2746.