The script is a great option, thank you for this.
…I’m also not pulling things out of wherever. I’m just saying it’s a viable option if done properly, and the OP was also asking for Mac-based options. I’m not putting down Windows options or dd or anything.
I should comment here that the Disk Utility in 10.4 and 10.6 generally don't have issues; the issues really started with 10.7, and accelerated with 10.12.
Disk Utility in 10.4 and 10.6 will generally make an ISO-compliant binary image of the track data and then append DMG footer data.
This format is actually quite useful because the start of the file is actually the start of the data read off the CD, and any non-original data is appended to the end. So if you want a byte-accurate ISO created from a 10.4 Disk Utility, you can just look for the start of the DMG footer and delete everything after that.
Of course, this only works for single track CDs -- multitrack, you're going to need to capture that extra data somehow in a header or footer, and then whatever is creating a new CD (or loading the image into an emulator) is going to have to know how to read that format. Bin/Cue is the simplest, because it writes the entire disc out to one file, and then records where the tracks and other data start and stop to a secondary file. Unfortunately, the Cue format was designed in such a way that you can't pass unknown data types to the application trying to handle the file and expect it to know what to do -- so cue files generally just contain the CD format, track start and end locations, gap lengths, and file names. Some tools are able to read files referenced in a Cue in alternate formats -- eg, take an MP3 or FLAC file and convert it to PCM audio and write it back to disc -- but this isn't standardized anywhere.
So another alternative is MDF/MDS or DAT/TOC, both of which encode all the data from the disc, and then have markers to explain how that data is to be treated in a separate file, along with "header" information.
One thing that makes all this slightly more confusing is that various optical media formats come with their own "header" data, which is written to disc as part of the disc data -- each track gets a header, and each disc gets a "header" that's actually a footer, so that if you have a multisession CD, the header data from the last session is used as the authority on track layout and contents.
The downfall of tools like Toast is that, instead of writing a separate header to the file, they just overwrote "useless" data in the track header section, such as replacing some of the details about what hardware wrote the original CD with information about what version of Toast imaged the CD. But because Toast overwrote in-place, this means it was possible for the Toast data to be longer than the original data, messing up the entire disc header.