There's a pretty decent chance that those particular lines were actually written by Lawrence Kasdan, an established writer-director who co-wrote both The Empire Strikes Back and Return of the Jedi (and is apparently working on the next Star Wars film as well).
Nope.
Those lines were ad-libbed on the spot by Harrison Ford.
During filming for the scene, Han was supposed to say "I love you too", but no matter how they tried it, it didn't fit. So, in a quick bout of frustration, Irving Kirschner, the director, told Harrison to explore Han a bit and just say something that he thought was naturally Han, something that Han (not the writer's) would say.
The next take, Carrie Fisher said 'I love you', and Harrison just casually said 'I know' without even thinking about it. He says he just imagined how Han would be in the situation, and he claims he didn't even think about the line.
30 years later, it was in Empire Magazine as the 'Best romantic line in movie history' (it was a fan vote btw). I'm not one for marriage quite yet, but the ice cool blonde Aussie spitfire I'm gonna marry and I are going to have this on our wedding rings.
That said, screw Star Wars. When they announced the new Comic line by Marvel at Comic-con, apparently they were met with a very muted reception by many of the Star Wars fans who grew up with the Dark Horse comics. But Disney wants total control, and has said a big 'F--- you' to all pre-existing material that isn't the films or the Clone Wars TV show (or anything else by George). 30 years of the EU, down the drain... It's sad. I mean, it's one thing if they let it go on as the non-canon alternate universe (the EU was almost completely done independently, with the only real things anyone at LucasFilm did were licensing, keeping the canon consistent, and approving what could happen and what couldn't happen. George himself was the one who gave the 'OK' to kill Chewbacca. But back to my point, since the EU is done by independent writers and the minimal involvement by LucasFilm, it wouldn't be a tremendous drain on resources to let it go on, and would likely make them additional income as well). Meanwhile they could have their own 'canon' universe separate from the 'Legends' universe and both could run concurrently, one owned completely by Disney, the other drawing in a large portion of money from licensing, sales (Star Wars EU books and comics were especially considered to be very good), and the big fandom around the EU. But they decided that aside from picking and choosing a few things from the EU, none of it exists any longer and that all further material of it will end definitively and permanently. This makes TOR technically non-canon as well, and there are rumors amongst some in-the-know Star Wars friends of mine that Disney is allegedly in the works to make their own MMO for Star Wars.
But enough of my ranting, back to ME3 humor.