rebuild-template-script: Miscellaneous improvements
- publish; don't attempt to republish already published tags. Sometimes we have to manually sort out a failing package then rerun publish, this makes that edge case easier.
- Only use keep-alive sudo hack in build(), as this is the only place it's needed.
- Cleanup comments