Northern Foods has moved back into profit after raising selling prices to offset the higher cost of cheese and wheat.