Reverting a change in copy where we check whether the source path is a directory.