Use assertRaisesRegexp for error testing

This uncovered a bug where things weren't being tested that should have been, plus better ensures that the correct DMFormatError messages are being constructed.