Check dir path before updating permissions. am: 018bae5e8e am: d575656259

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

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