Ignore newlines and tabs during port parsing too. Fix a bug in host/hostname parsing.