This excludes repository directories because they cause some exceptions
        occationally.

def in_repo(self, filepath):
        """
        This excludes repository directories because they cause some exceptions
        occationally.
        """
        filepath = set(filepath.replace('\\', '/').split('/'))
        for p in ('.git', '.hg', '.svn', '.cvs', '.bzr'):
            if p in filepath:
                return True
        return False