Fixes issue reported by https://github.com/jsvede/s3shell/issues/2. The issue is caused by leading '/' characters. S3 treats those like any other character which seems to cause files to be written to // instead /.