When parsing the JSON response from the HTTP request to create a new certificate... Use `grep -Po` instead of `egrep` as egrep is not matching across all the lines we need to match.
Also trim leading whitespace from `token` by passing it through `tr`.