In order to use multiprocessing in the new doctesting framework (#12415), sage's infrastructure for dealing with temporary files needs to change.
Apply
Depends on #13579
Depends on #13681
CC: @mwhansen
Component: doctest coverage
Author: David Roe, Mike Hansen
Reviewer: John Palmieri
Merged: sage-5.5.beta1
Issue created by migration from https://trac.sagemath.org/ticket/13147