Use sed to split out the short hostname

Instead of using the non-standard `-s` argument to `hostname`, use `sed`
to split out everything after the first period. This fixes lsrc(1) on
Cygwin, among others.

Fixes #28.