Corrected build directory creation and deletion