Update paths for generating 4.0 tpl files
Update paths to use local .tpl files instead of github branch
If local files do not exist, use github and make proper replacements