Added output directory and an OutputResults class to drive the actual output process.