Add test for opening files read/only