checkarg_base_url function

Checking and re-formatting base_url: