Misc fixes

- Use build tags inside generated runtime source, to cater
  for GOOS/GOARCH that cmd/go doesn't know about.
- Update exporter to create the output dir if it doesn't exist.