cmake: Fix '-E copy foo .' to avoid clobbering file

Backport KWSys commit 92334e7670 (SystemTools: CopyFileAlways: avoid
copying file over self, 2019-03-25) to the CMake 3.14 release branch.

Fixes: #19075
29 jobs for backport-kwsys-SystemTools-copy-self
Status Job ID Name Coverage
  External
passed ghostflow-check-master

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager