Bug fix in term.ts which can cause a null pointer exception during a resize.
Bug fix in term.ts which can cause a null pointer exception during a resize.

sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm