Check directory in Tramp's {copy,rename}-file

* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
* lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file)
(tramp-smb-handle-rename-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Check, that NEWNAME is not a directory given as file name.

* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file): Extend tests.
2 jobs for master in 90 minutes and 1 second (queued for 1 second)
Status Job ID Name Coverage
  Test
failed #2506
test-all

01:30:01

failed #2507
test-filenotify-gio

01:08:14

 
Name Stage Failure
failed
test-all Test The script exceeded the maximum execution time set for the job
  GEN      lisp/eshell/eshell-tests.log
ELC lisp/faces-tests.elc
GEN lisp/faces-tests.log
ELC lisp/ffap-tests.elc
GEN lisp/ffap-tests.log
ELC lisp/filenotify-tests.elc
GEN lisp/filenotify-tests.log
Pulling docker image gitlab/gitlab-runner-helper:x86_64-f100a208 ...
ERROR: Job failed: execution took longer than 1h30m0s seconds
failed
test-filenotify-gio Test
  SKIPPED  file-notify-test10-sufficient-resources-remote

Makefile:182: recipe for target 'lisp/filenotify-tests.log' failed
make[1]: *** [lisp/filenotify-tests.log] Error 1
make[1]: Leaving directory '/builds/emacs/emacs/test'
Makefile:247: recipe for target 'lisp/filenotify-tests' failed
make: *** [lisp/filenotify-tests] Error 2
make: Leaving directory '/builds/emacs/emacs/test'
ERROR: Job failed: exit code 1