Improved and simplified common path finding
Improved and simplified common path finding

Now the case with repeating slashes works:
test "$(path_common /foo/bar //foo//bar//baz; echo x)" = /foo/barx

More working tests:
test "$(path_common foo foo; echo x)" = foox
test "$(path_common /fo /foo; echo x)" = x

sukhmel/linux.scripts,sukhmel/linux.scripts