bash_profile: Split check-for-program code into its own function.