Properly parse the slave output.

Previously the slave standard output was not parsed correctly, which led
to malformed output in the storage whenever a slave crashed.