Fix mkdir test
According to `man 7 inode`:
> POSIX refers to the stat.st_mode bits corresponding to the mask S_IFMT
> (see below) as the file type, the 12 bits corresponding to the mask
> 07777 as the file mode bits and the least significant 9 bits (0777) as
> the file permission bits.
OCaml defines `st_perm` as:
> The type of file access rights, e.g. 0o640 is read and write for user,
> read for group, none for others
However, OCaml uses `buf->st_mode & 07777` and so includes three other
bits. We need to mask them out for the test.