Fixes latex/makefile cleaning when compilation has failed