--- a/src/old_main/misc.cc	2012-11-03 08:47:34.309732354 +0000
+++ b/src/old_main/misc.cc	2012-11-03 08:47:02.096573614 +0000
@@ -122,7 +122,7 @@
 		p++;
 	}
 
-	h = open(templ, O_RDWR, 0600);
+	h = open(templ, O_CREAT | O_RDWR, 0600);
 	return h;
 }
 
