Add spawn function export to helper.js

This allows us to inherit stdio and execute commands that take
control of the console.