Fix relative base path resolution and switch to url package