Use the get_singular_param_name method instead of a hardcoded "file" parameter name.

Thanks to Mark Richter for the report.
Merge branch 'master' into gh-pages