Sadly you will have to forget that. The border between Morocco and Algeria have been closed for decades. No getting through there. And the sahara part of Algeria is only possible with a guide (didn't look at that lately, but I doubt it as changed). So you'll have to look for a new dream.