Merge fix from 4.2.3.h3 for TRQ-1963: TMPDIR not set when $tmpdir was specified.