fixed temporary and result directory name clashes.