Actually, in this case, no it won't. Your own shell will parse $TMP_DIR and replace it with the output of mktemp, and then execute it.
Its only really bad if some does the following:
rm -rf /$TMP_DIR
The slash is important