gpgscm: Fix detection of unbalanced parenthesis.