Set permissions for object store using current umask

tempfile.mkstemp() creates a file with mode 0600 by default, which after
pushing, prevents others from accessing the shared object store.
Instead, use 0444 (as with git-native objects) and respect umask so that
pushed objects will be readable with default configuration.

Noticed-by: Ashok Argent-Katwala <ashok@freshbooks.com>
Comments-by: Owen Jacobson <owen.jacobson@grimoire.ca>
make compatible with python2.6