Correct 'commit vs ref' behavior in add

The 'commit vs ref' usage detection logic was broken
in the 'add' command.  It is now fixed -- it looks at the
first item in the Puppetfile, if present.  If that item uses
'commit', 'commit' will be used.  Otherwise, or if no first
item is present, 'ref' is used.  This should work even if no
items are in the Puppetfile.