Exporting base/input/output separately causes merge errors.
For instance, `foo: string | *"default foo"` gets serialized as
`{"foo":"default foo"}`, which will fail to merge if output contains
a different definition of `foo`.
This change temporarily merges the 3 streams together before
serializing.
Fixes#51
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>