Fix permissions on static JS/CSS files

tempfiles are created as mode 0600.  Still want to use getTempFile()
though, since it handles cleanup for us in case of error.