bson-to-json: allow specifying - for STDIN.
json-to-bson: check result from fwrite() and bail on failure.