Fixed various sonar issues. Cleanup and merge of SshFiles.copy and LocalFiles.copy