Added basic record protocol write functionality

* without compression and encryption
* data will _not_ sent through a socket but printed to stdout
Move MACROS to common.h
WIP: test main.c function