Mathematical modelling of pathogen specialisation