Universality beyond power laws and the average avalanche shape