Should we be using `Dir.mktmpdir` here?