Fix Delete files operation

Method os.path.filename doesn't exist. Change it to os.path.basename.