Use isatty instead if process.stdin.isTTY

Currently dat has an issue if you do some like

```
cd big-repo
dat cat | cat -
```

The output will end almost instantly because of an `EPIPE` error being emitted on stdout.
This is actually caused by some weirdish node behaviour (see joyent/node#7481) because we use `process.stdin.isTTY` to check wether or not stdin is a TTY.

This PR adds a quick and dirty workaround by using `tty.isatty(0)` to check if stdin is a tty.