Add -d parameter to receive-file-from.sh, fix a type issue in send-file-to.sh