Check dir path before updating permissions. am: ff2cc0cede am: 0976bad2f9 am: 2053f59c1f am: a4b0c0a24f

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/providers/TelephonyProvider/+/19734280

Change-Id: I418f2ea68d3f6908030aa4e7886060ce2987a5cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>