resize pty after starting

Since ptyMaster is created during container start (startPty), it should
resized after starting, not before.

Fixes #2377