remember to delete the tempdir at exit