I don't really like this, since the temp directory might get created on the local filesystem where there is limited space.