Added TERM setting for cygwin.

Refactored uname to a single invocation.