readwrite.py: fixing an error

Signed-off-by: Joe Buck <jbbuck@gmail.com>