Creates method to sanitize S3 object paths