add ability to write environment properties

This test should belong with first three tests in ``test_environment`` -- either all here (preferablly) or all there.