use a transaction, delete previous record if there was one where key is equal to the key given.
each bucket has it's own file storage now, key to filestorage ID refs are stored in the sqlite database.
added md5 function