Efficiency enhancement - directory paths are created only once, by opendir().