Make check_rosdep script more robust.