Different approach to the expect script.
Test on OS X on Travis.