Basic IO tests

Should prevent stuff like #1 in the future