[CB-4764] Move DirectoryManager.java into file plugin
Fix compiler/lint warnings