Provide a better error if ROOT_URL is not an URL

Fixes #1404.