Check for missing undo files at startup, making the check somewhat more ...

...efficient.

This is also an incremental step in making an index pruner for #4481