[ Manuel de la Peña ] * This fix ensures that the temp file is renamed to the final file before the post-command is executed. (LP: #1286553) [ Manuel de la Peña ] * Ensure that we do no have race issues between the diff downloads. This is fixed in two ways: 1. Use a temp file. 2. USe a mutex to decide the final path of the download. (LP: #1250612)