Fix Delete files operation

Method os.path.filename doesn't exist. Change it to os.path.basename.
Merge pull request #1 from phts/fix-delete

Fix Delete files operation