Create reliable method of checking if host is localhost