Improve documentation consistency
Add git status check to functional tests

- Don't proceed with test if working tree is dirty.
- Provide message about whether passed.
- Give non-zero exit codes on error.