Environment variables are moved out to a script, because CircleCI 2.0 does not support expansion of '$foo' in 'env' section.