Fix bugs in m_file

- M_LocalizePath returned a non-terminated string in Windows
- M_UnLocalizePath returned a non-terminated string
- M_AddDefaultExtension and M_SetFileExtension should have used
  M_PathJoin(Buf) and buffers