Fix how the template directory is initially created