Fix invalid temporary path on Windows