Add optional "args" keyword arg to main()

This allows calling code to supply a set of arguments to parse, rather
than grabbing them from the process environment.