fix mappedfile check
xapian: filesystem inspection

for two purposes: locating initial directories, and cleaning up.

We need this at Fastmail to detect our existing search instances
which will be on the data partition.

It will also be trivial to hook this into the compress codepath
for cleanup of earlier failed runs.  We'll probably _find_ the
dodgy directories in the first lock, but not delete them until
after we have blocked out the names by inserting records with
a higher generation into the file for every name.