Let `ioFileType()` optionally follow symlinks.
I reversed the sense of `stat` vs. `lstat`. Fixed!
Add a directory, to help validate directory enumeration.
Don't rely on `dirent.d_type`.

It's not sufficiently standardized, alas.