SPARK-3883: Fixed resolving parent directory of keystore