corrected a problem when previous temp directory didn't exist and we tried removing it