Added main method and exported function

Wrapped testing code in a main method.

Exported zotero_request function as zotero_request.

Change-Id: I1b604d513772c5105c6788a89fd4a9c4e19437af