file module should check invalid arguments (fixes #2135)

This fixes #2135.

In latest *devel* `template`, `group`, `user` and `lineinfile` complaint on unsupported param. Only missing fix is for `file`.

PD: Tried to reopen PR #2139 after rebasing but GH included lot of commits so I'm filing this one.