SELinux: Update the matchpathcon function to use the file's mode

If you don't supply a mode to the selinux.matchpathcon() function, it
fails to properly look up the context in some circumstances related to
context patterns in the SELinux policy.  This change looks up the mode
and supplies it to the function.
(cherry picked from commit 20a2c9a8fb6c6ecbed259b5deccb01c01bf3304f)