Fix bugs in pbrt code generated by obj2pbrt when textures are present