Make fileExists function a lot faster.

Make the installedTextures HashMap global and updated modularly.