Smarter handling of automatic top-level dir.