Repository: Improved GetForEachRef

Removed unnecessary replace
Merge pull request #125 from marcelometal/improve_get_for_each_for

Repository: Improved GetForEachRef
Fix error message, make it generic
Improve mock/tests for GetBranch (re #123)
Add test for subject with tab (re #123)
Test GetForEachRef method instead of the one that uses it
Warily treat an empty or invalid pattern (re #120 and #123)
Merge pull request #127 from scorphus/test-get-for-each-ref

Warily treat empty or invalid pattern (re #120 and #123)
Correctly accept an empty pattern (re #120 and #123)
Improve GetForEachRef() tests (re #120 and #123)
Refactoring CreateTestRepository