Test tunnel setup

Fix session ID bug - missed conversion to network order
Add optional tunnel parameter - default_gateway_MAC

Endian conversion helpers written in Lua
Add error handling to lib/macaddress