Fixups for f-ups

So I managed to make a few mistakes in the last couple of changes.  None of the EV hosts were recorded and the files weren't being closed properly.  Nothing immediately fatal, but this change also includes a way to use command-line arguments to select input and output files.