US snack food maker J&J Snack Foods has announced a sharp rise in quarterly earnings, helped by strong sales.