Added a test case for PHP-925, and also allow test to pick a master or secondary from a set.

It specifically does not return the full isMaster output, as the printjson
function outputs *extended* JSON, which includes things like ISODate. And of
course PHP's json_decode() can't do anything with this.
Fixed PHP-925: Reading a GridFS file from a secondary server using PHP requires write access.
Use sys_get_temp_dir() as per review.
Merged pull request #547