Add missing mode to open with O_CREAT
Add missing mode to open with O_CREAT

open(2) needs a third argument specifying the mode of the new file
if the O_CREAT flag is set.  Found while building in Fedora 17, as
this caused a build failure.

rodrigc/kyua,rodrigc/kyua,rodrigc/kyua,jmmv/kyua,rodrigc/kyua,jmmv/kyua,jmmv/kyua,jmmv/kyua