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

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