Give clearer errors for bad input in the packages file; suggested by pejo