Improvements and cleanup to environmentCheck.py.