Cleanup datalog output a bit. * Add close/flush on exit in case we have pending data * Use hash for comment characters to be compatible with gnuplot * Report x/y/z/e position in array