Fixed writeByte and testByteWrite methods.
Added in test timing loops.