Refactor findCommonUlPrefix to be generic enough to work with any url sc...

...heme, not just file://