Implement method which cheks if a given direcotry is a repository.