UrlScript: do not use magic method to access Url::$path

While [benchmarking Nextras\StaticRouter](https://github.com/nextras/static-router/commit/8aa3142d031fca21dc7a3dfe07d3320a4d9a1a09) I noticed an easy-to-fix bottleneck in `getBasePath` method.