HDFS-5165: correct file deletion