Merge "Adjustments to tmp dir handling"