Fixing bug in simulate_crashes to handle creat(mode = O_RDONLY) followed by writes to the file.