Create bootable drive from command line New with 10.9 is the ability to easily create a bootable drive from the installer that is downloaded from the App Store, with a single command createinstallmedia in the Terminal.  This link at MacWorld has details.

I encountered a problem with this, with an Error -9999 when trying to erase the USB drive I had inserted.

The error occurred while booted into 10.6.8; but since that particular computer also has a 10.8 partition, I booted from it and tried the same command with the same USB drive.  It was able to erase and create the boot drive successfully.

Don't know how widespread this problem is; but, if this occurs to someone else who does not have the newer OS available to boot into, I'm wondering if there is any other way to fix the error; or if the Disk Utility methods of creating the boot drive will need to be used.
This is a temporary issue in that running the script from an OS older than 10.9 seems to error out.

Can you take your image to a Machine that's already updated to run the script? You'd need two USB drives unless you're OK erasing the one holding the download before you know the script works.