Chances are that every system this script runs on has "mktemp," and trapping exit makes it easy to clean up when things are finished.
I'm sure this is excessive paranoia, but I have never been confident to release a script that classes a directory, I'm to worked about things like subtle differences in how mktemp works on linux and mac for example.