Added -d option to tear down hooks by template.