mongodump query option is limited to a query that fits on a command line. We have a use case where we generate queries for mongodump and they sometime take more than the 2K bytes limitation in a linux shell.
In order to overcome the limitation we propose passing the query using a file.
A pull request will be attached. (we solved it for 2.6.9)