title: pymongo.errors.OperationFailure saying ns does not exist
body: <p>I got an error as following :
  Traceback (most recent call last):</p>
  
  <blockquote>
    <p>pymongo.errors.OperationFailure: command SON([('mapreduce',
    u'tweets'),     ('map', Code('function() { emit(this.via, 1); }',
    {})),    ('reduce', Code(' function(key,value) {\n       var res =
    0;\n       values.forEach(function(v) {res += 1 })\n       return
    {count: res};\n    }\n    ', {})), ('out', 'via_count')]) on namespace
    Corpus.$cmd failed: ns doesn't exist</p>
  </blockquote>
  
  <p>The codes are :</p>
  
  <pre><code>   from pymongo import MongoClient
     from bson.code import Code
     con = MongoClient()
     db     = con.Corpus
     tweets = db.tweets
     map    = Code("function() { emit(this.via, 1); }")
     reduce = Code(""" function(key,value) {
         var res = 0;
         values.forEach(function(v) {res += 1 })
         return {count: res};
      }
      """)
  
      result = tweets.map_reduce(map, reduce, "via_count")
      for doc in db.via_count.find():
          print(doc)
  </code></pre>