'Prepare the job to run by creating the working directory and the
config files.'

def prepare(self, compute_environment=None):

    job = self._load_job()
    task = self.get_task()
    tool_evaluator = self._get_tool_evaluator(job)
    compute_environment = (compute_environment or self.default_compute_environment(job))
    tool_evaluator.set_compute_environment(compute_environment)
    self.sa_session.flush()
    (self.command_line, self.extra_filenames, self.environment_variables) = tool_evaluator.build()
    self.galaxy_lib_dir
    self.dependency_shell_commands = self.tool.build_dependency_shell_commands(job_directory=self.working_directory)
    task.command_line = self.command_line
    self.sa_session.add(task)
    self.sa_session.flush()
    self.param_dict = tool_evaluator.param_dict
    self.status = 'prepared'
    return self.extra_filenames
