Rework argument processing a little in command-line script.