[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.
Merge branch 'avoid_symlink_rename' of https://github.com/Vlatombe/jenkins
[FIXED JENKINS-20534] Noting merge of #1057.