More permissive directory name parser