Use a temp file when replicating the repository

When the repository is being replicated and an error occurs the local repository
is deleted. This commit causes a tempory file before moving the downloaded file
to its final location. The tempory file will be automatically cleaned up.

See: https://github.com/cloudfoundry/java-buildpack-dependency-builder/issues/9

[#78901290]
Merge branch 'cgfrost-78901290'

[resolves #9]