Add support for recursively copying directories and for dereferencing symbolic links in copy_to