Allows you to specify hooks when changing directories

Capn uses a simple YAML file for specifying paths and their hooks. As a quick example, consider the following:

   default_type: path
     - ~/.otherhooks
  - path: /home
    type: tree
      - echo entering /home
      - echo exiting /home
      - echo /home waves goodbye

  - path: ~/
      - echo entering ~/
      - echo exiting ~/

The above establish enter and exit hooks for the two listed directories. As you change directories you should see output indicating each hook's execution. You'll notice that the /home path has a type key with the value tree. There are two types of hooks; path, which is the default, only triggers for that absolute path. tree hooks will trigger when you enter or leave the tree below the specified path. Moving between child-paths below the tree does not trigger the hooks. For example, moving from / -> /home would trigger the enter hook. Moving from /home -> ~/ would not trigger the exit hook.