Add before filter to check if the current directory is a repository.

Also locates the '.scv' directory even if it's inside one of the parents.