cmd/go: quote expanded shell variables used within regular expressions
cmd/go: quote expanded shell variables used within regular expressions

We mostly use shell variables for paths, and we don't want file paths
like "C:\work\go1.4" to turn into regular expressions.

Updates #30228
Updates #30241

Change-Id: If18b775b2f8b2821eaf197c4be4a322066af839f
Reviewed-on: https://go-review.googlesource.com/c/164626
Run-TryBot: Bryan C. Mills <1c8aad60184261ccede67f5c63a0d2a3bf3c9ff4@google.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>
Reviewed-by: Jay Conrod <f3fadaedc813344da5ec13b41e26596889cc5baa@google.com>

golang/go,nawawi/go,cloudflare/go,akutz/go,akutz/go,akutz/go,golang/go,nawawi/go,josharian/go,nawawi/go,cloudflare/go,CAFxX/go,josharian/go,golang/go,CAFxX/go,akutz/go,josharian/go,cloudflare/go,josharian/go,golang/go,cloudflare/go,golang/go,akutz/go,akutz/go,nawawi/go,cloudflare/go,nawawi/go,CAFxX/go,CAFxX/go,josharian/go,josharian/go,akutz/go,akutz/go,cloudflare/go,nawawi/go,josharian/go,nawawi/go,golang/go,golang/go,CAFxX/go,CAFxX/go,cloudflare/go,golang/go,CAFxX/go,josharian/go,cloudflare/go,CAFxX/go,nawawi/go