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

This reverts commit 2fce124a5690907a8c2b6977310c1238a2f36205.