makefs: don't needlessly require directories to exist
If a type=dir entry exists and all contents are directories, files
added with contents=, or symlinks with link= attributes then it doesn't
need to exist. Just let openat fail in that case. It's conceivable
this will make debugging some cases weird, but it's sufficent to handle
the way we add /root/.ssh in CheriBSD VM images.
This is a recommit of 794154149f95d0cbc11aade166f9da919747e397 with
bugfixes.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D38029