Bugfix: Hash#delete has side effects ;-)

Also:
- reorder `grep` parameters and refactor external call into method
- replace `STD(ERR|OUT)` with `$std(err|out)` and check output in specs