Check mkdir return value in tests