Retain permissions when copying files.

Fixes JENKINS-14269
https://issues.jenkins-ci.org/browse/JENKINS-14269
The source file might be r--. In that case the line is required. Otherwise the target will be created as rw-, not r--.