Merge the two replacements for open() into a single one.