Another useful set of tools for CHM files in non-Windows environments is the CHM Tools Package. It's available as source code, and includes a program, chmdump, which extracts the HTML from a CHM file into a separate directory.
It's also available for Mac OS X via MacPorts.
If MacPorts is installed on your system, you can type:
$ sudo port install chmdump
at a Terminal prompt to install the package. You can then extract a CHM file with:
$ chmdump chmfile.chm outdir