Fixed wrong mode format for stat on OSX.