Merge changes I1fb50fb6,I8b3fa817

* changes:
  Ensure that both stderr and stdout are captured
  Make sure that we join paths correctly.