Refactored S3 utility functions and added more bucket acl tests