In case anyone's interested in doing the same, I walked this route, early one morning last December
It's entirely feasible provided the weather is not too hot, you allow yourself enough time (around 1:30 hours), you're traveling light and you've got a satnav on your phone, or at least a very good map
I set off around 6:30 am from the Jemaa el Fna, the temperature was pleasantly cool and the roads not too busy
I got some great views of the sun rising over the Atlas mountainous as I strolled along
If you want to get a drink or something to eat, make sure you do so within the first five minutes of leaving the square as there isn't anywhere else until almost at the airport
If you need to answer a call of nature there isn't anywhere along the way either, except for where it's possible to nip into an olive grove roughly half way along
