[backend] Handle compiler exceptions properly.
[backend] Add seperate place for I/O intensive git calls.
[backend] Some more changes to further integrate git in seperate places.