Electron energy loss spectroscopy of excitons in two-dimensional-semiconductors as a function of temperature