Close file when NetCDFTrajectory object disappears.