Don't search repo in open views

Nobody likes surprises.
Search repo in parents hierarchy of target paths
Print error messages
Remove trailing spaces
Merge pull request #2 from maliayas/improvements