Fixes in regex and file processing so all templateUrl are replaced.