National Rail has apologised for a glitch which meant some railcards were issued without photographs.