Use root, which has document, instead of self.
Don't swallow non-existant files.
Merge pull request #1867 from matham/rst-doc

Rst fixes