Add a method to copy files, preserving attributes
Summary:
Unlike the built-in copy() function, this preserves file attributes
on filesystems which have them.
See D16273.
Test Plan: Called from arcanist's ArcanistLintPatcher
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: epriestley
Differential Revision: https://secure.phabricator.com/D16275