Removed unused exception strings and added string for putenv failure.  Throw an exception when putenv fails.
Add try/catch blocks for environment handlers.