Fix error handling for python api wrapper

The title says it all.

Also included are some bonus documentation updates.
If we stick with using the base_url code we can easily switch between making calls to localhost and the remote server.