check if server has been free()'d in every method

* raise RuntimeError instead of causing a segmentation fault.
* fixes #6.