Don't reset showDetails flag. If we don't reset it then we leave the
tree in the same open state it was when the user left that view.
Add directive directory-tree-display-entry to consolidate common code
between the display-tree and display-tree-dir directives.