without rewrite bug fix Environment.php

Incase of rewrite the $scriptName is null, which is causing the 'Without rewriting' case to break, as the strpos endue with an error 

 Uncaught exception 'ErrorException' with message 'strpos(): Empty needle' in  Environment.php