Reverted to using file objects for reading/writing to socket (maintain compat with pickle). Add some better error handling around a few places and fix stuff found in testing of the class and usage (python 2.5 - python 2.7)