Use mktemp to create the temp directory instead of doing it in the download one