Dust in the outer layers of the Barnard 5 globule