builder: fix escaping for ENV variables.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Merge pull request #8639 from erikh/fix_escapes

builder: fix escaping for ENV variables.