Check dir path before updating permissions.

Bug: 240685104
Test: atest android.telephonyprovider.cts.MmsPartTest
      atest CtsTelephonyTestCases
      Sanity check - sending and receiving sms and mms manually
Change-Id: I2c60cc2cf8f1f6890678d3cd8c6cfdf31356349f
(cherry picked from commit ff2cc0cede04445bf5ecbdaf3f0aa8dd0d48ac94)
Merged-In: I2c60cc2cf8f1f6890678d3cd8c6cfdf31356349f
1 file changed