# Functions
CopyDir recursively copies a directory tree, attempting to preserve permissions.
IsDir determines is the path given is a directory or not.
IsSymlink determines if the given path is a symbolic link.
RenameWithFallback attempts to rename a file or directory, but falls back to copying in the event of a cross-device link error.