posix/compat:  Fix fdopendir() on OS X

It turns out that while /dev/fd/N will stat as a directory, any attempts
to use it as one fail with ENOTDIR.