Added buffer overflow protection for bits read in by magnetic card reader.  Now if someone tried running a ridiculously long magnetic strip through the reader, the program should not crash.  Also added volatile data types to several global variables being changed by ISRs and the value returned by spi_write.