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

Change-Id: Iaed2538831b19ada26005bbef33cff28209c6512
diff --git a/BenchmarkGen.h b/BenchmarkGen.h
index 0b732bc..0f59848 100644
--- a/BenchmarkGen.h
+++ b/BenchmarkGen.h
@@ -4035,7 +4035,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;
     }