Added getHostname() helper for parsing hostname from URLs.
Added test for getHostname()