Fixes in utility functions

regexp in normalizeUrl fixed
assertion in getHostPosition fixed