Fix issue with hostname having a digit at end.

I was finally able to reproduce this after sleeping on it. Here are some additional tests that
will fail under the original conditions.