Greatly simplify path and extension detection for NoLocalSettings.php. Fixes bug...