Support directory copying

Note: symbolic links are not yet supported, so this implementation
may fail when symbolic links are present. For example, a symbolic
link could create an apparently infinitely deep directory structure
and the recursive directory copy algorithm would fail.
Support copying a file to itself