Fix uuid generation for template data download.

We were creating an s3 key with an empty segment, which led to 403
errors from aws.
Add tests for these multimethods