Fix URLWithPath to use correct component.