Add a bunch of tests for contract creation error messages.

Also minor fixes to said error messages.