Refactoring more code from FileSystemUtils into HdfsUtils.