Added missing exception for invalid repository.

Closes #27.