fix #1581 - do not try to create an existing directory

Treat existence of parent directory as a condition to create template content.