Remove unnecessary intermediate directory