pg_upgrade: fix CopyFile() on Windows to fail on file existence

Bruce Momjian <bruce@momjian.us>

Commit: b17dbf26293e3805b5f7ab5a11a8e3f984c476ad
Author: Bruce Momjian <bruce@momjian.us>
Date: 2015-11-24T22:18:28Z
Releases: 9.5.0
pg_upgrade:  fix CopyFile() on Windows to fail on file existence

Also fix getErrorText() to return the right error string on failure.
This behavior now matches that of other operating systems.

Report by Noah Misch

Backpatch through 9.1

Files