RemoteFile: add a CopyFile() static function

This allows either local or remote files to be copied. It's useful to
copy a local file to a remote master or slave BE or vice versa.

Performance seems a little slow may have to try tweaking the buffer size
to optimize it a little.