Use unsafeCleanup to clear temporary dirs, closes #345.

//cc @raszi @sindresorhus @Iristyle