More consistent IO error messages

1/ use of the past tense
2/ quoting of filenames to catch subtle errors such as trailing spaces
3/ use of throw() instead of die