Adding environment unit tests to the standard testsuite.

Also, fixed small issue with an environment.js unit test.
Merge pull request #225 from sethmcl/fix_environment_tests

Adding environment unit tests to the standard testsuite.