[MacPlatform] Factor out code for opening terminal

And make all the arguments optional.
[MacPlatform] Implement opening terminal with env args
[Mac] Robustify icon lookups

Should fix BXC16413 - Xamarin studio crashes when creating a empty text file