Improve performance of Location constructor, by avoiding exception throwing when path is not an URL