Handle a nonexistent course in `add_cohort`.

Test more edge cases in cohorts.py