Proper fix for issue #3578. Also, this reverts the changes made for issue #3458 while maintaining the ability to dmap when the tdm directory contains uppercase characters.

git-svn-id: https://svn.thedarkmod.com/svn/darkmod_src/trunk@5898 49c82d7f-2e2a-0410-a16f-ae8f201b507f