private static void makeParents(File newFile){
    //Yeah sometimes parentDir comes out null. Quirky Java API's are quirky.
    File parentDir=newFile.getParentFile();
    if (parentDir!=null && !parentDir.exists()){
      makeParents(parentDir);
      parentDir.mkdir();
    }
  }