changed mkdir so it uses a template