Properly escape arguments to API calls. Fixes #7.