Added dbg.h for debug messages.
Updated build and testing instructions.
Fixed issue where head and tail would not be set to last index of buffer.
Added read and write tests; partially implemented.