Author: Ben Franksen <firstname.lastname@example.org>
Date: Sun Feb 18 14:36:20 CET 2018
* resolve issue2566: avoid renaming across file systems
The trick is to create the temporary directory in the same place where we
want to create the final directory. Previously it was created in the
directory, which could result in crashes when the final directory is on a
different file system. Note that we must use takeDirectory from the native
System.FilePath, else this would fail on Windows.