Returns contents with characters that are meaningful in globs backslash-escaped.
contents
static String quote(String contents) => contents.replaceAllMapped(_quoteRegExp, (match) => '\\${match[0]}');