Improve readdir() code a little. Specifically, don't bother doing tests which are always true if control flow reaches them to begin with.