Minimally resurrect fpLookupSubdir() functionality
- fpLookupSubdir() has been broken for a long, long time, probably
because some subtle extra/missing slash issue. It got totally
wrecked by the pool changes though: there are heading and trailing
slashes everywhere and the calculations were off-by-one to every
possible direction because of that. And the previous attempts
(eg commit
566a332c6907a0969ea8f79a4c7a62bca2d1f1b4) makes
even a bigger mess of it.
- This is far messier than it needs to be, but for now going for
minimal resurrection rather than rewrite it all at once. It's also
not quite right either, but it does now actually detect at the conflicts
it was always supposed to.