Shebang: remove unneeded lines
Don't test shebang without artifact.json
Shebang: document how the script works

The $r is never used, so we remove it.
Better explanation and some refactoring
Remove some whitespace
Merge pull request #172 from hashdist/shebang

Refactor shebang