Convert DirectoryHelpers to Scala.