add functionality to copy a directory