Update templatemap_generator.php

Another way to fix the real path
Merge branch 'hotfix/4783'

Close #4783
Merge pull request #4835 from ThaDafinser/patch-12

Update templatemap_generator.php
Merge branch 'hotfix/4835' into develop

Forward port #4835