Use (almost) the same logic to identify URLs passed from command line like in AddressWidget, references #371
Ultimately it should be moved to own class, including host lookup