Fix for JENKINS-18238

Updated code to create symlink for the build (based on private instances
build number) as well as update the PeepHolePermalinks.

This should resolve:
JENKINS-18238
JENKINS-6096

And may influence:
JENKINS-18105