added an option --output <file>

output the generated code to <file> rather than stdout