Escape env values rather than simply quote them.

This implements a fix for #144.