leveldb: Set ErrorIfExists option

also added test case for the same.