Enhanced template tasks to support running from directory