212aeb9106
Rather than assume that the destination argument is a directory, check first, and then do the same thing that 'cp' would do. - If dest exists and is a directory, copy to the directory. - If dest exists and is a file, copy over the file. - If dest does not exist and is a directory, fail. - If dest does not exist and is a file, create the file.