fixed -x in getopt parser; turn off color in pipes

- Use the test '-t' to see if STDOUT is connected to a terminal or a pipe, and
  colorize accordingly
- Fix the command line parser so -x is parsed as --exclude