Minor fix for edge cases when cleaning the build directory