Updated codegen.ml

1. Added the "#include .." header file in the beginning of the
generated code file.
2. Print the generated code in screen and also output it to the
"output.cpp" file.