Improved tmp file names and deletion on exit.