Fixes creation of folders in root
Fix creation of folders in S3 media source root

* origin/pr/11869:
  Fixes creation of folders in root