Fix imports as noticed by flake8.
Fix calling the logger before setting it up.
Whitespace.
Rename some variables for clarity.
Replace pickled data exchange by json.

Fixes #31.
Print the directory of failed jobs.