Bugfix and readme change

The +1 in the write method is removed. (null terminator)
Also made a few changes I had to made for working example code. (In the readme).