SNP ministers have been accused of letting down rural Scotland after it was revealed that the condition of schools is more likely to be better in towns and cities.