CTS: stop checking permission if dir is null

A exception will be reprotetd if dir is null.
  -java.lang.NullPointerException: Attempt to get length of null array

Also fix a typo which should be fCpu instead of f.

Signed-off-by: Lianwei Wang <lianwei.wang@gmail.com>
diff --git a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
index 6841b28..2b472b5 100644
--- a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
@@ -426,9 +426,11 @@
             }
         });
 
+        if (dir == null)
+            return;
         for(String cpuDir : dir) {
             File fCpu = new File(cpuDir + "/current");
-            assertTrue(f.canRead());
+            assertTrue(fCpu.canRead());
         }
     }