Fix check for valid parent id.

Parse as decimal (which means you can't specify --parent-pid in hex,
that's fine). And convert back to string to check that the whole string
was parsed as an int (i.e. "123foobar" should not be converted to
"123").

Thanks Slava and Avital.