Changing python search pattern to look for localhost as well.