Test readdata with a file object. Closes #196
Rename the test as it tests writing to objects as well. Closes #197