Fix tmpdirs being left behind.

It gets messy.