simplify scp_mkdir implementation

(patch has not been completely applied before)