Numerous fixes for invoking salve.

Moved script to top level because it simplifies importing nonsense.
Fixed typos in block.
Added missing import, return in optparse generation, etc.