fixed NPE in directory permission dialog