Added editor and updated main.cpp in the engine.

The engine now changes its working directory to the mod under use! This
is useful for the modder because it makes internal paths shorter and or
easier to generate.