Write the generated d_file to a temporary file.

def write_dfile(self):
        """
        Write the generated d_file to a temporary file.
        """
        f_in = self.tempfiles.get_tempfile(prefix="bmds-", suffix=".(d)")
        with open(f_in, "w") as f:
            f.write(self.as_dfile())
        return f_in