fixed unit tests; fixed bug in lua script flashing and encoding of OBD2 channels