public String verifyAndCleanDir(String directory) throws IOException {
        File pathToVerify = new File(environmentifyDirectory(directory));
        if (!pathToVerify.isDirectory()) {
            throw new IOException("directory is not a directory");
        }
        //gets us a real path a la windows fashion.
        return pathToVerify.getAbsolutePath();
    }