Ensure build and cache dirs are present before doing anything else