Fix for bug #9234, from Georg.

Our TempFile class uses QTemporaryFile internally, and, on Windows,
this keeps the file locked so that we cannot rename it. So we have
to release the lock.
remove file that was accidentally committed
small tweaks spotted by Uwe