Improved split_userhost and added tests.