public OutputStream store(String name) throws IOException {
	final File nm = forres(name);
	File dir = nm.getParentFile();
	final File tmp = new File(dir, nm.getName() + ".new");
	dir.mkdirs();
	tmp.delete();
	OutputStream ret = new FilterOutputStream(new FileOutputStream(tmp)) {
		public void close() throws IOException {
		    super.close();
		    if(!tmp.renameTo(nm)) {
			/* Apparently Java doesn't support atomic
			 * renames on Windows... :-/ */
			nm.delete();
			tmp.renameTo(nm);
		    }
		}
	    };
	return(ret);
    }