Clone of spark404's Parent of Parent fix

The pull request via https://github.com/jenkinsci/copyartifact-plugin/pull/15 didn't seem to work. Full credit goes to @spark404 for this original pull request.