Fix error return to be NT_STATUS_NOT_A_DIRECTORY.