Refs #60, adds database level checks to API tests.

This makes the tests more robust, because instead of just checking that the API script didn't return an error, it checks that the actual action was completed in the database when adding/deleting.