private void createDir(String dir) {
		File f = new File(dir);
		if(f.exists() && !f.isDirectory()) {
			Main.fatalError("Cannot create folder '" + dir + "'. There is a file called the same name.");
		} else if(!f.exists()){
			try {
				if(!f.mkdirs()) {
					Main.fatalError("Could not generate all of the directories '" + dir + "'.");	
				}
			} catch(SecurityException e) {
				Main.fatalError("Cannot create folder '" + dir + "':\n" + e);
			}
		}
	}