Currently temporary files are only removed if the transfer and deserialisation is successful.
BAM-7841 Publish artifact directly to artifact directory
BAM-2523 Remote agent artifacts result in temporary files on the server that are not removed