Better Jekyll compatability

Two minor changes to better support testing Jekyll-based sites:

1. Check if a path is a directory (which implies the real file is at `./index.html` before passing to Nokogiri

2. Support for links to root, which would otherwise result in a no method `length?` for nil class error