Various fixes

Most importantly it just numbers imported meshes and materials instead
of guessing names. Avoids issues with long pathnames. Needs a better
solution in the future.