Modified i2c class to improve code efficiency of file handling routines.

Add param value checks to a few methods

Changed the send(int) method to send(unsigned char)