Move the error handling to its own file...
Split lines from file...

For each domain we want to be able to set it to a different address,
this would allow for example:

apple.local:apple.com

And a CNAME record for apple.local would be set to apple.com

We also allow $self to be used. This retrieves the current hostname
using a gethostname() call. This way you can create files that can be
used from system to system.
Update the test script
Add function to turn a string into a dns string

DNS strings are uint8_t length, followed by a chunk. The ending should
be a \0.

So example.com turns into:

<7>example<3>com<0>
Update the test.domains file

This makes the {com,net,org}.example.test.local CNAME's to
example.{com,net,org}.
Remove the statically defined alexandra.local CNAME

This now uses the new DNS string, and registers it instead. This then
will register the CNAME entries correctly in mDNS.