Export function results through stdout instead of global variables

@charlierudolph @daviscabral This change minimizes the use of global variables by making functions export their result though stdout rather than global variables.
Agreed. I renamed the function to `has_open_changes`, and the variable to `initial_open_changes`, thereby matching the other global variable `initial_branch_name`.