Don't change the types of 'withTemp[File,Directory]' in 1.18.

Add new functions 'withTempFileEx' and 'withTempDirectoryEx' instead.

Fixes #1387.