Added code from goobi 1.8 for method executeMudule()

Now our module is working again as expected and issue #31 could be closed from our side.