There is another problem with white spaces. The globbing function in exists() cannot handle white spaces. This is not trivial to fix, we have to rewrite the function.
mkdir -p man/man1
cp /usr/share/man/man1/cat.1.gz "man/man1/ZZZ cat.1.gz"
/usr/bin/man -M man "ZZZ cat"
No manual entry for ZZZ
No manual entry for cat
see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275978