Don't use mock_open because it's not available in all of our supported O...

...Ses.