Fix creation of folders in S3 media source root

The proposed change seems to fix https://github.com/modxcms/revolution/issues/11868 also didn't encounter problems creating subdirs with that change.