On Mac: check stat flags and report the file as FILE_ATTRIBUTE_READONLY if it's marked as Locked in the filesystem