Make remove-unused-sources create a temporary dir

The script previously relied on $TEMP being set outside of the script.
It will now create (and remove) a temporary directory to store it's
temporary files.