[TIMOB-14386] Fixed bug in copyFileSync() when copying a file to a directory.