Docs

 - Added JSDoc comments and generated documentation (fixes #7)
 - Fixed the default absolute path for root.
 - Added examples (fixes #8).