Generate import paths in accordance with the standard Go package layout.

If a .proto imports "a/b/c/foo.proto", we assume that will generate
"a/b/c/foo.pb.go". Previously we would try to import that as "a/b/c/foo.pb",
which makes no sense if this is a standard Go source layout, so we switch
to trying to import that as "a/b/c". The `M` parameter permits overridding this
anyway.

Fixes #8.
4 files changed