Create necessary paths before calling rsync,scp

This will create the paths using mkdir -p on the package server prior
to calling rsync. This is necessary because otherwise rsync might fail
to create all levels of folders with
"rsync: mkdir "" failed: No such file or directory (2)"
This patch won't change the behavior of the function itself.

Change-Id: I0d90614c3574db03e4806fc8ea7778f5c5b49d36
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>