Fix build under OS X

Import github.com/kless/term and use its portable version of
IsTerminal()
Add initial Travis config file