Code changed in jenkins
User: Vincent Latombe
JENKINS-20534 Avoid usage of temporary file to write symlink.
Creating a symlink is an atomic operation, and additionally
usage of tmp file + rename performs very badly on NTFS file
system because of the way the rename is tracked in the $MFT.
In case symbolic links are not supported, we still fallback to
a regular file.
(cherry picked from commit c0742b8bff9fe407e568da7ed860f30d9ea8aedc)