Add pythonic functions for checking internet and wifi connection using urllib2