os: preserve old tmpdir resolution order