modify rosnode_ping to check if new node uri is valid before using it (related to #221, fix #235)