Test for the temp directory before trying to delete it.