mkpath(), fmkpath(), and makepath() return success when the path exists
as a regular file, or anything else that is not a directory:
touch /tmp/foo; mkpath("/tmp/foo", 0755);
Any path that stat() can find is taken to be done.
Check that it is a directory, otherwise fail with ENOTDIR.
Closes#26