Update DirectoryFactory.java

It is impossible to use predefined DirectoryFactory realisation without static.