Add link_directory and link_tree

Closes #664