Fix 0.8.1 regression in ROOT_URL with path

Fixes #2109.