simplified I/O

converted header to CLI arguments (how Splunk passes them)

Simplified output writer using csv.DictWriter.