added capability to specify tmpdir to use to store rundir