Files and directories are now also added to the index.
Added example for using the source tree.