Docstring fixes
Optionally write badge images for use on github pages etc

See #2099