Only write the sysimage .tar if the curl is successful.

* avoids a condition where a .tar is unsuccessfully downloaded, but
  the download is never reattempted.