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

Add new functions 'withTempFileEx' and 'withTempDirectoryEx' instead.

Fixes #1387.
Pass '--libdir' etc to 'setup configure' when installing.

Otherwise libs with 'build-type: Custom' get installed under
'$prefix/lib/$pkgname' instead of '$prefix/lib/$arch-$compiler-$os/$pkgname' if
the setup script is compiled against Cabal < 1.17.
Merge pull request #1388 from 23Skidoo/with-temp-file-ex

Don't change the types of 'withTemp[File,Directory]' in 1.18.
Merge pull request #1390 from 23Skidoo/install-dirs-fix

Pass '--libdir' etc to 'setup configure' when installing.