For #26167 - Ensures folders exist before saving files
- previously, if a template had dynamic leaf folders (e.g. the scene
name) the would cause problems!