Fix permission problems on Windows with large repositories

This uses a custom implementation of tmpfile() which works on Windows.
The problem was caused by io.tmpfile() and os.tmpname() returning
files in the root directory on Windows.
Normalize indentation in project
Merge branch 'master' of git://github.com/mkottman/lua-git

* 'master' of git://github.com/mkottman/lua-git:
  Normalize indentation in project
  Fix permission problems on Windows with large repositories