Pass-in sys.argv rather than stdin.