Refactored ckan installation code into a module. Now with corrcet logfiles & python environment.