gfile: Add wrapper for open(3p) and use it instead of directly calling open

This is in preparation to making the wrapper enforce the O_CLOEXEC flag.
3 files changed