Fixes #8326: deletion of directories on S3
Converted an array to PHP5.3 compatible version
Merge pull request #9529 from helmutschneider/fix-8326

Fixes #8326: deletion of directories on S3