Moved checking of the parent directory (if it is not a repository) into
RepositoryManager.