add unit test for clearByNamespace. Attempting to write a unit test for clearByPrefix shows that it's actually not an issue (due to the prefix itself differentiating a file from a dir), so revert my change to clearByPrefix