Reworked temporary folder handling to no longer accidentally overwrite in the case of multiple temp folders