Fix resource leak in File destructor.