fixed a bug with the texture exporter

Testcase for terrain texture generation added