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 
I assume that these permissions are never read from the `oc_share` table directly, because in that table it the permission 0 means something different.
If we want to be safe we could set the default permissions to -1 which means "needs refresh".
Because 0 could be a legitimate permission in some cases.
What do you think ?