FIX Environment file finder logic

Fixing the logic that searches for environment files so that warnings
due to open_basedir are suppressed and both the 'realdir' and the server
path are spidered for the environment file.
Merge pull request #1972 from dhensby/environment-conf-patch

FIX #1866 Environment file finder logic