added a switch to allow overwriting.  plus tests of same

modified:   lib/put_doc.js
modified:   test/test_put_doc.js