fixed isHttps test for relative protocol links. 

relative protocol links are constructed by leaving the http: or https: component off.  (i.e //mydomain.com/index.html)  

A regex is more accurate than an indexOf() here.  The pattern can properly match the beginning of the string - which is the only place that defines protocol http or https.