The error has change in 2.1 to:
gpg: secret key "foo.gpg" not found: Not found
(i.e., it doesn't say Unknown system error any more.)
The fundamental issue is that the argument to --gen-revoke is not a filename,
but a user id (e.g., the key id). I've accordingly change the error message in
46e128d as follows:
$ gpg2 --output revoke.asc --gen-revoke foo.gpg gpg: no secret key matches the search term "foo.gpg"