Looking at the female connector from the back of it, it should be yellow on top, brown on left, and white on right. Make sure what when you put them back in the connector that they are click back into place. To make that happen, make sure that you bend/push the tiny fish hooks back on each of the three terminals.
If you are getting 12V on that female connector, then your stock wiring is working at this point, temporary at least. There must be either something wrong with the relay or the connector is not seating correctly. How this happened: my guess is that you have a faulty turn signal stalk. The issue as you have read in other threads, is that the switch wears down, and dirt and whatnot gets in there and causes connections to occur that should not (as indicated by things such as the clicking). In this case I think the switch was either not holding the circuit for a few seconds or was arching for a few seconds. Either way, I think it was sending power to the relay in an rapid on/off/on/off fashion hence the flickering and likely burnt out the low beam trigger on the relay.
The other reasoning would be to say that the relay is what was faulty and somehow shorted out causing the fuse to blow. This would certainly be a plausible explanation, however given the know issue with the turn signal switch, it is hard to over look that in favor of this. Either way, the best way to approach it at this point is to go with a new turn signal stalk and new relay, assuming you check your connections and they seem to seat correctly.
A test you could do to verify a bad relay would be to remove the relay from the harness. With the H4 connector plugged in and the low beams on, you can color match the low beam wire to the connector and test for voltage up at the relay connector. That will pretty much isolate the problem to the relay if you do get voltage up there. Let me know if that explanation was confusing. The idea is that if you get voltage all the way up to the point where the power goes into the relay box, and we know the bulbs and ballasts are good, then the issue must be the relay box itself.