[BACKLOG-435] - Fixing potential path issues on windows, changing dir create retry logic, cleaning up temp dir when done