Fixed bug related to tmp dir copying.