Copy restore-TTY functions from Scala script so binary distros don't need 'scala' installed
Get rid of debugging statements
Add deploy/testing procedure