Apply changes to work with latest Travis / Docker. Cribs heavily from
https://github.com/d11wtq/dockerpty