[#1] Don't run command on a "dirty" branch

So when there are modified, deleted or renamed files on a current
branch, the script is not executed and shows error message.
[#1] clarify `dirty_branch?` logic

Extract Method, Introduce Explaining Variable etc.
Merge pull request #2 from vrybas/1-dont-run-on-dirty-branch

[#1] Don't run command on a "dirty" branch