Strip trailing whitespace
Add missing blank line before end tag
Reformat examples section so that it can be output properly

Also tidy up pan a little for style.
Improve resources section

Apply code tags as suggested by @wdpypere.
Listify list items.
Clarify text.
Add code tag around variable
Document purposes of schema paths
Point out that `initdir` is optional
Merge pull request #277 from jrha/documentation-dirperm

Improve dirperm documentation