added function to write current env to file
Merge branch 'master' of github.com:rcbops/jenkins-build