tools: fix cli args parsing

No need to "shift" if argument does not expect parameter on the command line.
(cherry picked from commit 6372ac926c6a6622222915ac4f9301021f731c35)