Avoid using stream_context_get_options when $stream_context is null

Otherwise it will error (when using curl and a http url) with this message:

```[Tue Jun 18 10:30:29 2013] [error] [client 123.123.123.123] PHP Warning:  stream_context_get_options() expects parameter 1 to be resource, null
 given in /var/www/example/classes/Tools.php on line 1290, referer: http://example.com/adminareia/index.php?controller=A
dminModules&token=6cb1f7b4ea8f1091840128401928010918249
```