Fix to handle both positive and negative termios.TIOCSWINSZ
Implmenented gupload functionality