Add arguments parameter to commandLineOptions()

Previously, commandLineOptions() would always use process.arguments as
arguments; now that’s the default value, but you can pass others as
well. Useful for unit testing.
Extract function to parse files from run()

Work towards #44