UK value retailer Primark has apologised for the distress caused to a customer who found a sharp blade in a pair of baby shoes he bought for his son.