code review part 3

Here you go.

* fixes: Racecondition, imports, rename some things to be more clear, whitespace, comments
* helper.py is getting smaller
* add default to argparse:directory