kr/pty modified as per gorilla/context 20130910

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>