just a guess, but maybe getPositionInPixels is returning the position of the anchor point, which by default is the center of the sprite, and boundingBoxInPixels returns the position of one of the points of the box( lower left by your coordinates )
try yourSprite.setAnchorPoint(ccp(0,0)); and then check the positions, note that this would put the sprite in a slightly different position than with the default anchor point.
just a guess, but maybe getPositionInPixels is returning the position of the anchor point, which by default is the center of the sprite, and boundingBoxInPixels returns the position of one of the points of the box( lower left by your coordinates )
try yourSprite.setAnchorPoint(ccp(0,0)); and then check the positions, note that this would put the sprite in a slightly different position than with the default anchor point.