commit fixed version of install code (issue #779)

this was a mistake, the fix was supposed to be included as part of the
original commit:

156441100fdddf4cb7a02e4a74644c2c827ccfa3
"install: avoid accidentally re-creating installed.txt (issue #761)"