Always close files in case of exceptions upon creation.

If the user of the library gets an exception before he
can get the actual object he will be unable to manually
close it. Therefore the library will now close it instead.
Exceptions in close() for read-only objects is from what I can tell very hypothetical (I haven't been able to reproduce it), and even if we I can produce I don't think it's useful enough for the call-site.