Fixing NullPointerException

Checking if directory exists before attempting listFiles on it. This is
required since data/private/name-transforms is not compulsory.