Similar to what cockpit-composer does. This is rather simplistic, but does fine until we need more complex scenarios. Also use plain shell in test/run, there are no bashisms. Closes #291
Closes #16