Improve test cleanup and use sync_template to download a template without a screen (TUI-18)