debug & fixing to test errors

everywhere:
- using get_socket_ready instead of setting global in g_opts
- using wrapped read/write for debugability

files.cpp/h:
- wrapped read/write so that they can more easily be tracked while
debugging
- added a set_socket_ready to centralize routines

parcel.cpp:
- fixed a few more cases where g_session_key was assumed to be a string
instead of binary
- moved early case of setting the socket ready to later

testParcel.py:
- started basic framework for unittest, including moving command line
execution into a main function
- added ability for test to generate test data (once or every loop)
- cleaned up some of the output