Make lack of version number line throw a BadVersion exception and add more tests to test_format