Fix upload buttons when user home is read-only.

This fixes missing buttons problem with extended javascript and contains
files patch that adds required php code to apps/files/templates/index.php