Fixed up the pretty printing a little, such that we are not writing the same bit of pretty printing twice, once for a file and once for stdout. This also gives us quite a
nice output file object for use with the 'with' syntax
Merge branch 'pretty-print-fix' into dev
Merge pull request #8 from allanderek/dev

pretty print tidying