Fix issue in which the FileHeader was being read but not saved. It was then not actually being written to the output image. Implement STDIN/STDOUT requirements.