I recently wrote a command line utility called webarchiver (free, source code available) that allows you to create Safari .webarchive files from the command line. Webarchives are a convenient way to store a webpage and its associated files (images, css, javascript, etc) in a single file. It is very simple to use:
./webarchiver -url http://www.google.com -output google.webarchive
Make sure you include http:// in the URL when fetching a remote webpage. If you don't, webarchiver attempts to locate a local file. Webarchiver is only compatible with OS X 10.4, and is a universal binary.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20070226154943363