(#6749) Extract the action from the arguments cleanly.
This adds a test to verify that we are correctly removing the action name from
the set of arguments passed to the string action, then cleans up the previous
code so we don't need to mutilate the command line arguments: we can just
extract it from the resultant set of information.
Reviewed-By: Nick Lewis <nick@puppetlabs.com>