Since this included so much more than temporary directories now, maybe we should change the message to "Tried to write to invalid location" ?

Other than that, this looks fine.