Much enclosing of variables to make it possible to use model dirs and output dirs containing spaces etc