Fix search behavior and tests for bare repos.
Merge pull request #121 from repotag/master

Fix search behavior and tests for bare repos.