Create unique cache dir to prevent race conditions. Issue #344.