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.
Merge pull request #178 from johngibb/master

Fix curl command output