Fix issue #178

This patch is extracting the current TERM of the user instead of forcing
it to "xterm". This patch was only tested on my server.