[ttb] Added output file

I actually added in the output file feature. If no output file is given, we write to stdout. If an output file is given
we write to that file. Currently this is done with a hack since there is already a default file name of a.out. If the
name is a.out, the file is switched to stdout. This will get fixed later on.