Added well-formedness checks in the Driver

The amount of boilerplate we need to write for each single test is way
too large.