When a DocGeneration template is created, it is created with Global Unique Identifiers (GUID), not Relative URL's.
GUID's cannot be automatically updated when migrating a site or using power shell. The Templates have to be exported from the old SharePoint site using the DocGeneration exportation tool and imported into the new site using the importation tool, only once DocGeneration has been activated with the product. The version of DocGeneration installed when templates are imported should be the same as the version used to export templates.
For more on Exporting/Importing templates, click here