Fix S3 folder creation for new AWS API

This also fixes the unit tests
Merge pull request #11726 from owncloud/s3-fixunittests

Fix S3 folder creation for new AWS API