...
If the ball is on the line when the 'keeper handles it, then the Direct free kick could also be on the line and therefore in the area! Therefore it should be a penalty kick for handling by a goalkeeper within his penalty area!
Not sure how the last bit follows.
If the GK's hand is on the line it's not an offence. If he handles it outside the line the FK is given from where he handled it. Where would you place the ball for a foul just outside the penalty area? Personally I can't see a problem under the laws if the ball touches the ground outside the PA and part of the ball is in the penalty area - but then I don't go with the whole concept of extrapolating law 9 to anything else (e.g. goal kick taken when the base of the ball is outside the goal area).