Added kwargs to doc.save to help interop with django (#223, #270)