fileperms() seems not return same values on OSX and Linux.