fixed the templates to intelligently guess index servers and accounts based on directory names