Not using a temporary file when locking files for writing.
The temporary file was not actually useful, because we
could never really get atomic renames, for annoying,
complicated reasons.
This hopefully finally fixes #1812.
Signed-off-by: Luke Kanies <luke@madstop.com>