Fix very bad bug in tempdir deletion.