Javascript redirect fix for readonly folders.

This fixes missing new and upload buttons with redirects when buttons are not on template.
Also hides permission denied button.
Change default for folder visibility.

Chanded default to true, to show Shared folders on root folder.