Do not add question mark to the url if params are null or empty

Also added charset name to URLEncoder. URLEncoder.encode(String s) was
deprecated in API level 1 (see
http://developer.android.com/reference/java/net/URLEncoder.html)