DEAAgent: Ensure that both out/err streams are closed in case of failure

Signed-off-by: Alex Jackson <ajackson@pivotal.io>