fix path to new tmpdir/output file