Add output to specified file + minor clean-up

- Redirect console output to a specified file (if any) via puts2() and
printf2()
- Change the "rt"/"wt" params in fopen() to the standard "r" and "w"
- Define and use a few macros in the MIPS code generator instead of
hard-coded constants