If, say, we want to do something else with the direct contents of the
directory, then it would be nice if this were easy. Pull the variable
declarations out, pull an initial priming call to `listdir' out, and
move the inner `listdir' to the end of the loop.