Fixed some problems with PouchDB w.r.t. blob creation to get attachments to work