Fix more broken file handling.