Use high-level functions to create temprorary files
Use high-level functions to create temprorary files

Using low-level functions forces us to handle low-level file descriptors and
encodings, while we could safely rely on Python for that.

Related to #1074.

Kozea/WeasyPrint,Kozea/WeasyPrint