Enable use with "go generate" tool by adding -input and -o flags

* "go generate" cannot simply redirect STDIN and STDOUT