Add support for output directory tree

This plugin should support `--output=<lang>[:<dir>]` and nested directory structures.

Replicating the [behavior of the official C++ plugin](https://github.com/kentonv/capnproto/blob/master/c%2B%2B/src/capnp/compiler/capnpc-c%2B%2B.c%2B%2B#L1989), the patch makes sure all the directories in `RequestedFile.filename` actually exists before trying to write the content of the compiled Go source code.