test: bot_git: more careful about possibly null temp directories