added base station synch

also improved mote side synch functions and function for writing data to
SD card in FAT32 format