Made curl honor location redirects, fixed templatelist.txt url path gene...

...ration (TUI-43)