tg.sh: fallback to tmp dir outside .git