In certain circumstances a failed build can leave stray files on the
filesystem. The presence of these files can cause subsequent builds to
fail because of filename collisions. This patch removes the build
directory (if it exists) when re-running a failed or canceled build.