[profile] Fix bug in exit-on-signal specifier parsing

The parsing logic for the '%Nx' specifier had a bug which made it
impossible to specify handling of two-digit signals where the second
digit is 0. Fix it and add a test.

rdar://problem/24098975
(cherry picked from commit 29107a0e2baacf42e4f4baa0a83d557a3fc7aa88)
2 files changed