pki: Check length of commands array before accessing command in --help