Indexed scripts/templates : Add timeout to get script from index.

This commit adds a timeout to the request objects and adds a test for the timeout.
There is also a default timeout incase the call to get the script isn't coming from a TransportAction.