Added flushing to the PhotonCounts output streams.
Added more comments to the  write_photonstatistics subroutine
Increased the length of various filename variables to 512.