Updated UrlGenerator.php

This allows properly formatted path parameters to be used (those beginning with a trailing slash; e.g. "/path/to/page" & the root "/"), without breaking past compatibility by still allowing ("path/to/page"). These path parameters are used in methods such as URL::to('/page'), Redirect::to('/page'), etc.

Also, this fixes an issue where the root path was being output incorrectly by URL::to. URL::to('/') used to output "http://domain.com" (without a trailing slash), but now outputs "http://domain.com/" as it should for the root URL.