Fixed bug with jobArrays where tempfiles were being deleted too soon.