Temp download folder bugfix and test cases