The command, used as the dot label, can contain quotes which need escaping when
used within the quoted string.
Formatting with `%q` rather than `\"%s\"` does this for us.
I don't believe digests or the shapes can ever contain quotes (or other unusual
characters) but switch them to `%q` as well for consistency.
Signed-off-by: Ian Campbell <ijc@docker.com>