Making args#parse_args testable

and, obviously, adding a test.
Extracting some methods from args#parse_args

It was quite hard to understand what was going on on that mess, still
messy, but better