Allow agent to remove templatedir as it's deprecated