fixed incorrect content-type being sent

safe_urlopen uses urllib2 which sets the content-type to application/x-www-form-urlencoded by default. We are sending json encoded data, and so have to override the headers.
Merge pull request #10 from trevorah/patch-1

fixed incorrect content-type being sent