private File buildWorkingDirectory(String scriptPath) {
        return new File(scriptPath.substring(0, scriptPath.lastIndexOf("/") + 1));
    }
Build the File that represents the desired working directory. In this case,
the directory the script is in.

@param scriptPath Full path to the script passed to the smt jar.
@return File of the directory with the script in it.
tika-translate/src/main/java/org/apache/tika/language/translate/impl/MosesTranslator.java