util: make gcc shut up by passing a 0 mode param to open()

If we pass a variable to open()'s flags parameter it really wants a mode
parameter too, otherwise some gcc version whine. Hence, pass 0 in that
case.