Fixed build errors and warnings in userguide

These changes are to fix issues which were emitting errors and warnings during the Sphinx build of the userguide.

Also added the Sphinx build directory to .gitignore to avoid commiting Sphinx build artifacts.