[supervisor] Fix size of permissions buffer
[supervisor] Fix size of permissions buffer

GetCfgPermissions returns a string that is typically "rwx", of max
size 4 including null-bytes.
Buffers are however declared using MAX_DEVICE_PERM_STR_BYTES, of size 3.

Also updating DoesLinkExist function to take a pointer instead of
copying the whole stat structure.

Resolves: LE-13182
Related: LE-13147
Change-Id: I4b8b469ad0c344b11e52e6d2f33ecd5326c467b2

legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af,legatoproject/legato-af