Is there any way to set a custom quick look image in OS X? I'd like a command line tool or applescript to change or embed a custom preview for a file using a jpeg.
No. The way Quick Look works is that a plugin, which recognizes your file, is required. Only such plugins can supply images to QL.