Extract out parsing proto file logic from ProtobufGen

Or, better yet, you could leave it like this and add a unit test for it in test_protobuf_parse.py