Fix problem with creation of template directory.