Escape absolute paths when forming URLs

My previous lazy code was effectively only doing that for relative ones