Environment config file update

Currently there is an inconsistency with how deep the framework will
look for _ss_environment.php (depending on whether you're installing or
running) and there is also an arbitary limit to how many directories
deep the environment file can be put.

I have some projects that require it to be over 3 levels deep
so felt a more portable and generic loop until hitting the root
directory would be best.