fixed fallback for local scratch dir