Set 'dir1' and 'dir2' to proper values instead of temporary ones.