scan_build_scm_url "$@"
-tmp=/tmp/$COMMAND-$$
-git archive --remote=$GIT_REPO $GIT_TAG $COMMAND | tar -C /tmp -xf -
-mv /tmp/$COMMAND $tmp
-chmod +x $tmp
-$tmp "$@"
-rm $tmp
+tmpd=/tmp/git-$$
+tmpc=$tpmd/$COMMAND
+mkdir $tmpd
+git archive --remote=$GIT_REPO $GIT_TAG $COMMAND | tar -C $tmpd -xf -
+chmod +x $tmc
+$tmpc "$@"
+rm -rf $tmpd