Fix this by simply always setting the mode, as it doesn't hurt even
when O_CREAT is not specified.
This bug is a regression introduced in fc3e40e, as xopen(), which
was originally used, would automatically set the mode.
Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
(cherry picked from commit e111a1640494fe87fc913f94fae3bb805de0fc99)