Fix for_each_submodule

- split status command output on newlines
Fix get_branch regex