Unwrap optionals for basic auth credentials
Escape quotes in curl command

JSON will have quotes which need to be escaped before being run on the
command line.