Some makefile fixes and cleanups.
dlls and takes load order into account. Install them in dlldir. Improved MODULE_GetBinaryType to recognize ELF binaries. Added a wrapper script to setup the environment when running directly from inside the source tree.