Added CRUD operations for segments

Could not write specs to test valid/invalid segments as fakeweb does not allow one to specify request bodies in registered URIs. See https://github.com/chrisk/fakeweb#known-issues