Revert "Revert "Revert "Minor changes to ensure it works on Windows under SourceTree's bundled BASH environment"""

This reverts commit aedd64461cc1f9da1fcda96383183ead037f6754.