fix the logic for parsing ports/addresses

This fixes two things:
 * ketama spins in an infinite loop if you give it an invalid file type.... specifically if you do `--config=</path/to/some/directory>` then it will spin infinitely. so guard against that.
 * I introduced a regression in my earlier changes that caused `--bind=*:8000` (where 8000 can be any port literal) to not work correctly. This fixes that.

I will add tests for both of these bugs in another commit.