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

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

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