Fix some temporal directories not being removed by tests