builder: fix escaping for ENV variables.

/cc @tiborvass 

closes #8636 
saw the line above, nm