fix paths to use tmpdir variable