Let opendir() use O_DIRECTORY.
Let opendir() use O_DIRECTORY.

I am not removing the fstat() calls here, since we cannot yet assume
people will always run kernels that respect O_DIRECTORY.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase