Why not use the nio api's? e.g.:  ```scala  val rootDir = Paths.get(root)  require(Files.isDirectory(rootDir), s"Root path $root must be an existing directory.")  Files.createTempDirectory(rootDir, prefix)  ```  