### Please describe the problem.

I have a latex file which takes two passes to build.  It is in a directory managed by git-annex assistant and configured to use a remote SSH server as a transfer back-end.

If I use latexmk to build the file with the git-assistant on then the build fails.  If I turn off the git-assistant it succeeds.

### What steps will reproduce the problem?

[[!format sh """
~/current/www.cmt.mhs.man.ac.uk $ git-annex assistant --autostart
~/current/www.cmt.mhs.man.ac.uk $ latexmk -c admin_guide_cmt.tex
~/current/www.cmt.mhs.man.ac.uk $ latexmk -pdf -silent admin_guide_cmt.tex

Latexmk: Run number 1 of rule 'pdflatex'
This is pdfTeX, Version 3.1415926-2.5-1.40.13 (TeX Live 2013/dev)
 restricted \write18 enabled.
entering extended mode
print() on closed filehandle GEN32 at /usr/bin/latexmk line 4742.
print() on closed filehandle GEN32 at /usr/bin/latexmk line 4759.
print() on closed filehandle GEN32 at /usr/bin/latexmk line 4761.
"""]]

Dropping the silent option shows that the admin_guide_cmt.aux file is not available for writing - despite being created.  I suspect that the assistant is somehow locking the file, or using it between passes of latex.  If the auxillary files all ready exist then there is no problem (i.e., don't do the cleanup via latexmk -c)

Disabling the assistant makes everything work.  Latexmk is doing something odd - I can't replicate with the native latex build commands.

### What version of git-annex are you using? On what operating system?

Latest version, via cabal, on Fedora 18.

### Please provide any additional information below.

Nothing appears wrong with the assistant transfer wise.
[[!format sh """
add www.cmt.mhs.man.ac.uk/admin_guide_cmt.aux (checksum...) ok
add www.cmt.mhs.man.ac.uk/admin_guide_cmt.fdb_latexmk (checksum...) [2013-06-11 14:42:17 BST] Committer: Committing changes to g
it                                                                                                                             
admin_guide_cmt.fdb_latexmk
         264 100%    0.00kB/s    0:00:00 (xfer#1, to-check=0/1)

sent 372 bytes  received 42 bytes  828.00 bytes/sec
total size is 264  speedup is 0.64
[2013-06-11 14:42:17 BST] Transferrer: Uploaded admin_gui..b_latexmk
[2013-06-11 14:42:18 BST] Committer: Adding 3 files
ok
(Recording state in git...)
add www.cmt.mhs.man.ac.uk/admin_guide_cmt.fls (checksum...) ok
add www.cmt.mhs.man.ac.uk/admin_guide_cmt.log (checksum...) ok

# End of transcript or log.
"""]]

> Ok, I was able to remove the write bit fiddling in direct mode. [[done]]
> --[[Joey]]
