Parse $@ in a single loop

Parse options in a single loop and set the BORG_ACTION variable,
then switch on that variable instead of looping on $@ twice.