Fixed another issue with cbuilder and added ability to write to files instead of stdout.