Use the new normalize_dir procedure throughout.