herd: test for main python thread before execute.

This is useful for loading up the interactive interpreter to test
out some of the functions during development.

This way herd.py can be imported like:
import herd
Now reads from stdin if no hosts.dat or --hostlist

Example:
    cat hosts.dat | ./herd.py /tmp/test /tmp/test

Fixes bug if --hostlist is passed junk like:
    ./herd.py --hostlist 1,2,3,,,\#test /tmp/test /tmp/test

Fixes bug --hostlist passing blank list of hosts like:
    ./herd.py --hostlist '' /tmp/test /tmp/test
Merge pull request #13 from samrocketman/feature/stdin-hosts

Bug fixes and read from stdin