From your account I would say that you made a number of mistakes.
Probably the first was having your radar on too short a range scale. A distance of 4 miles is simply too close to not end up in a close quarters situation. The tug, at ten knots, covers a mile every six minutes and you will cover substantially less. Thus you will be limited in how much you can get out of the way. Early detection with radar is everything. You did not mention the sea-state, you may have been lost in the sea-return on his radar.
Secondly, you violated the Colregs to the extent that you altered course to port and you did it in small increments. You were in danger of contributing to what is known as a radar-assisted collision. At the distance you detected him, if you decided that an alteration to port was the only option, you should have made the alteration very large-perhaps ninety degrees. We used to call this, "showing him a green" (or red). At the distance involved, both he and you were no doubt operating on bearing drift. Especially with an alteration to port, it is your obligation to make the course change substantial and therefore readily observable. Again, that brings us back to the radar scale your were operating on-too short range.
The danger signal is for vessels within sight of one another. (this matter was discussed at length in the seamanship thread under 'signalling' I believe) A more appropriate signal in fog might have been "uniform" or other signal that cannot be mistaken for another signal.
It is quite common for tugs to use the outer edge of the shipping lane, leaving the heart of the lane to larger, less manoeuverable ships. As he was not constrained by draft, and you probably appeared as a small vessel making little way-possibly fishing, he altered course to starboard as required by the rules. Your proper action at that range would have been to alter course to starboard as well. Which brings up the point of being too close to the shipping lane to make such an alteration safely. If you look up in the Colregs the paragraphs on Traffic Seperation schemes you'll see that sailing vessels and vessels under twenty meters are not to impede the traffic of vessels in the scheme and are to keep well away from the scheme.
I know I'm really working you over here, and your heart has already had it's stress test for the annum (g). But, when you determined that your only safe, albeit late, action was to go to port you really had only two viable actions you could take. Take all way off and sound "U" and perhaps shone a spot light straight up to attract attention. Or, if you were to alter to port, do so in a radical fashion and increase speed so as to make it obvious. another old dictum regarding altering to port-make it big enough and if, while still turning, it is apparent that the other vessel is not observing your turn, keep on turning. If he's going to hit you, you want it to be in the stern while running away from the collision. Sometimes this manoeuver results in your making a "round turn", but at least you are alive.
And I am glad to hear you are alive. It could have ended very badly. Reach out further with your radar, make early and substantial changes to course, and stay right away from the traffic seperation schemes. (let 'em run aground before they hit you!)
“Scientists are people who build the Brooklyn Bridge and then buy it.”
Wm. F. Buckley, Jr.