Save output of package manager into file if dep-install fails. Fixes #229