Replace the stat command with the ls command to check file mode
bits. The stats command is not available on Windows and has
different command line options on OS X.
Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>