Change a couple of two-argument open() calls to use three arguments