Update terminal.py

Fix the error in determining the size of the terminal on FreeBSD.