CB-6571 Fix getParentForLocalURL to work correctly with directories with trailing '/'

Fixes 2 failing unit tests in mobile spec.