When writing files to the LFS file storage, we create a temporary file
and rename it into its correct place. Use the function that was
recently introduced to create a temporary file that honors the umask.
This should make all uses of Git LFS honor the umask, since Git handles
writing the working tree files for us.
We compute the proper permissions value on demand. In a future commit,
we'll need to read the configuration file, and on clone, we'll want to
wait to read the configuration until we have a repository.
Add a test for this and skip it on Windows, since we cannot be
guaranteed to have POSIX permission support there.