Save the permissions in the filecache if it's not saved yet

This also fixes the upload/new buttons not showing up.

cc @DeepDiver1975 @schiesbn 
`0` means no read permissions, files without read permissions are never stored in the cache