Library code improvements

I made some improvements to the library code mainly for better portability.

Instead of having game/UI libraries extracted to tempmodules in the game folder, system code now decides where to extract the libraries to. For instance, on Android, it will be the internal storage cache directory.

Also the tempmodules folder name now contains a timestamp along with a random number to reduce the possibility of collisions.