Fixed removing of tmp directory.