PDIO-265 Correct handling of local temporary files and HDFS files clean up