* partial implementation of using a tmpdir if one exists