Fix the nightly head.hackage pipelines
I also moved the computation of the right tarball URL into it's own script so it's easier to test locally.
I also moved the computation of the right tarball URL into it's own script so it's easier to test locally.