Fixed option parsing for spawn.

* it is now possible to set a custom entry point.
* argc and argv are now passed correctly.