Refactored git part; (re)throw exceptions from inside agent

Squashed commit of the following:

commit 89b939c20eae39f84084d3d21b06f4aba3655454
Author: Thomas Schank <DrTom@schank.ch>
Date:   Thu Jan 2 21:32:12 2014 +0100

    Fixes

commit dd72418eee17c9a28f0b2fc981cd9f4230db422f
Author: Thomas Schank <DrTom@schank.ch>
Date:   Thu Jan 2 20:55:02 2014 +0100

    Refactoring for clearness

commit 0cf0cb97030c1b286e93b58c0ad3f35d7ef3283c
Author: Thomas Schank <DrTom@schank.ch>
Date:   Thu Jan 2 20:38:44 2014 +0100

    Fix

commit 79a86c776178d7a453066a1dae3527ebe19c16f6
Author: Thomas Schank <DrTom@schank.ch>
Date:   Thu Jan 2 16:57:06 2014 +0100

    Added TODO note

commit b99fd92ed08f6575ed2497f5ebd59f2b1d3a8a30
Author: Thomas Schank <DrTom@schank.ch>
Date:   Thu Jan 2 16:47:32 2014 +0100

    Finished refactoring of git

commit 9bbd8274b10c73b9a0dac7c43fb434790e7d3494
Author: Thomas Schank <DrTom@schank.ch>
Date:   Thu Jan 2 16:24:34 2014 +0100

    Refactored git to use  commons exec in lieu of shell

commit d3ba2fe5768ff013e2d494c09dc64f7ff5e74954
Author: Thomas Schank <DrTom@schank.ch>
Date:   Thu Jan 2 15:06:02 2014 +0100

    Minor refactoring of util ns

commit 04ed5afbf276bfd2ee41bb66e80ef2b727e71b03
Author: Thomas Schank <DrTom@schank.ch>
Date:   Thu Jan 2 14:08:51 2014 +0100

    Added GET on /trials to fetch a list of processed trials