I'm wondering, a little, about the interaction of the "scripting engine" (if that's a fair description) and other chdk "stuff" e.g. if a script were trying to close the shutter at effectively the same instant the usb remote "process" was trying to open it is conflict likely?
To expand somewhat on waterwingz answer:
CHDK does not directly control the shooting sequence. It just hooks the normal firmware at various points.
If you shoot using CHDK (script, usb remote), it makes the firmware think the shutter buttons was pressed, which starts off a long complicated sequence involving a bunch of different canon firmware tasks. If you use remote sync, then the remote code causes this process to be blocked at a certain point. Similarly, CHDK overrides just change some values at particular points in the code.
Under normal operation, CHDK doesn't control the mechanical shutter at all, it just tells the canon firmware to shoot. So any concern isn't between the scripting engine and remote code, it's between CHDK and the canon firmware.
The mecha shutter functions waterwingz referred to are "eventprocs" exposed by the Canon firmware. You can call them from CHDK Lua, but how this interacts with the canon firmware shooting sequence is not specified.
My observation is that the camera doesn't care if the shutter is already closed, so if you called the close function before the canon firmware would normally close, it just stays closed. I suspect it would be the same if you called it after the Canon firmware had closed it.
As far as I know, on cameras like this the mechanical shutter is really only used to at the end of the exposure, to prevent the sensor from accumulating additional exposure during readout. The exposure is started electronically, and "open" is the default state of the shutter, since it's required for live view.
If you called the close function after the the canon firmware was completely done with the exposure and had already re-opened it for live view, then it would close again and your live view would be black, and your next shot might start with the shutter closed.