Cleanup uses of sprintf, add modes to open() with O_CREAT.

Change-Id: Iaed2538831b19ada26005bbef33cff28209c6512
diff --git a/bench/benchgen.py b/bench/benchgen.py
index ec14aef..bda3370 100644
--- a/bench/benchgen.py
+++ b/bench/benchgen.py
@@ -278,7 +278,7 @@
         LOG(ERROR) << "Failed to read random data";
         return -EIO;
     }
-    if ((out = TEMP_FAILURE_RETRY(open(name, O_WRONLY|O_CREAT|O_TRUNC))) < 0) {
+    if ((out = TEMP_FAILURE_RETRY(open(name, O_WRONLY|O_CREAT|O_TRUNC, 0644))) < 0) {
         PLOG(ERROR) << "Failed to open " << name;
         return -errno;
     }