BS-11489, Revert commit 792e71e299e121fd294feeab7b4b2e64566cf0a5 (Add deleteOnExit for the temp file where it was missing)