revamped to use spawn instead of exec. output is now streamed realtime, instead of dumped at the end. fixes #2