Improve tar-related code
The following details of the tar module are changed:
- improved style (now flake8 is happy)
- improved documentation
- avoid using the shell when calling external programs
Since the shell is not used for execution anymore, there is no further need for customized (but incomplete) escaping, like in #867863.