[JENKINS-9741] Added a test to verify file permission handling.