Changed code being used for reading from card reader. Credit to Bjoern
Heller