Small safety change to check for basedir before clean