This will retry upon refused connections and similar errors, wait 1 second
before the next retry, time out after 10 seconds if no data is received or
the connection times out, plus try an infinite number of times.
Two instances of the fetch-params.sh script running at once will
result in corruption of the proving key and an error when the
hashes are computed. This implements a lock to stop such a
scenario from occurring.
We also terminate and don't create the symlinks if the downloaded
parameters fail the checksum command.