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