Corrected couchdb.delete so it can delete doc's