Webarchiver allows you to create Safari .webarchive files from the command line.