[filegen.go] Generate an output file

This is mostly working, but I am not generating the
corrent numlines. Going to add an issue and work on this tomorrow.