[JENKINS-17681] Set up a test which passes on Unix but fails on Windows when symlinks are enabled on the platform but disabled for the current user.
(cherry picked from commit 00d5e38759d08fa89ef366fd430e900f4138f0af)
[FIXED JENKINS-17681] Do not try to call resolveSymlink on a nonexistent link as you will just get an IOException, breaking peephole permalinks in some Windows environments.

(cherry picked from commit 3c2b50ecfe1c58f64b32d30a3f96e647671f7d03)
[FIXED JENKINS-17681] Use builds\last{Stable,Successful}Build on Windows for permalinks.
(cherry picked from commit 4af5c22134a05b6e885cbf1a721412711325c92e)