Add file param to URL function call

Add a file param to the URL funciton call so we can switch based
on the file's properties.
Fixes cases where an empty opts.data results in params containing a single empty string,
causing "undefined" to show up in the post body, eg:

--------multipartformboundary1361198653141
Content-Disposition: form-data; name=""

undefined
Document new file param to url functions
Merge pull request #102 from fjania/master

Add file param to URL function call
Merge pull request #113 from hx/master

Fix for empty opts.data