Escape all quotes in CLI refs to prevent quadruple quotes