Fix issues with flutter doctor (#7808)
Fix issues with flutter doctor (#7808)

* fix issue detecting ios-deploy. fix issue matching IntelliJ Ultimate on Mac

* refactor directory navigation code

flutter/flutter,Hixie/flutter,Hixie/flutter,turnidge/flutter,cbracken/flutter,flutter/flutter,turnidge/flutter,cbracken/flutter,tvolkert/flutter,cbracken/flutter,turnidge/flutter,turnidge/flutter,Hixie/flutter,cbracken/flutter,tvolkert/flutter,cbracken/flutter,cbracken/flutter,flutter/flutter,flutter/flutter,Hixie/flutter,tvolkert/flutter,Hixie/flutter,flutter/flutter,flutter/flutter,Hixie/flutter,Hixie/flutter,tvolkert/flutter,tvolkert/flutter,tvolkert/flutter,Hixie/flutter,tvolkert/flutter,cbracken/flutter,flutter/flutter,flutter/flutter,flutter/flutter,cbracken/flutter,tvolkert/flutter,cbracken/flutter,turnidge/flutter,cbracken/flutter,Hixie/flutter,flutter/flutter,tvolkert/flutter,Hixie/flutter,tvolkert/flutter