Addressing comments in pull request #475.  Used some boost filesystem
functionality to remove custom code. Added EnvironmentTests file. Other
small tweaks.