Remove temp files before exiting

Signed-off-by: Gianpaolo Macario <gmacario@gmail.com>