Ensure temp cache directory exists before file IO

How was the folder created in previous builds? Magic.