Add readDir primop

supersedes #235
Does `fstatat` work on Darwin? "man fstatat" doesn't show anything on my Mac.

In any case, it's not needed, because `readDirectory()` in `util.cc` already returns the file type without an extra syscall. There is some fallback code in `findRoots()` for platforms/filesystems that don't support this, which could be factored out and reused here.