Merge r1170:  Use environment variables to locate a suitable
temp directory, fix the final dir cleanup.

SVN-Revision: 1271
2 files changed