use $SCRATCH as $VAR_DIR root if it's set

otherwise we can't generate sufficiently large inputs