Handle single-file item directories better in submit_dir.py