Added error handling to catch P7_builder errors.

We would rather not have the C segfault and bring down the webserver, so
we added some error handling to catch the errors and display them on the
submission form.