Fixed write

had assumed value was what we were supposed to write to disk, didn't
know we were supposed to repeat it until the block was full, but we do
that now (also got rid of an malloc/free we didn't need)