Fixed the temp.dir cleaning after build