SONAR-4748 Fix issues and regression for temp folders