mds: verify mds tell 'dumpcache <filename>' target does not exist

Open target with O_CREAT|O_EXCL to ensure we don't overwrite some other
important file (like, say, /etc/passwd).  This is irritating because there
is not c++ ofstream equivalent for O_EXCL; kludge around it using
ostringstream instead.

Fixes: #3266
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #197 from ceph/wip-3266

mds: verify mds tell 'dumpcache <filename>' target does not exist

Reviewed-by: Greg Farnum <greg@inktank.com>