Fix inconsistent hostname handling

`lsrc` was stripping hostname domain suffixes, but `mkrc` was not meaning
that `mkrc -o` didn't work correctly with a suffix. This was particularly
noticeable on OS X where the hostname has a `.local` suffix by default.