Fix bug in directory depth counting.

The path "dir//file" has the same depth as "dir/file".  Also verify
with local unit tests.

Test: /data/nativetest64/installd_utils_test/installd_utils_test
Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 67471251
Change-Id: Iab35b4fe5591ddd42a7121b630cffcd94ad23c40
2 files changed