This time last year I arrived at the Mori border with no Euro's other than the 30 I'd managed to get off tourists in Morocco for the border expenses. Just ask every tourist you meet and you should be able to build up some Euro notes as they all need to use dirhams. Have a print out from the internet showing the typical cash rate and give them something better. In Western Sahara there will be hundred's of mobile homes so try asking them as well.
Then in Dahkla or somewhere get out as many dirhams as you want (I got 1,000 euro's worth) and forget about changing large amounts at the border or no man's land - just get enough there to pay for insurance etc. Then go to Nouadhibou and haggle like a crazied banshee with a hangover. Don't be in a hurry. Take a day or two over it and know the official rate from oanda.com. The supermarkets will often do it and give you the best rates as they buy a lot of things from Morocco. The campsite types guys will try quite a few tricks and aren't trustworthy from my experience - too many hanger on'ers. People typically offer 20 or so, quickly up to 25 and then the rest is up to you.
I think the official rate at the time was 30 dirhams and I got 29.5 for my 10,000 dirhams but I really had to haggle like heck - with about 8 different parties in the end. One of the supermarkets did it in the end with little fuss as it was a large amount and the guy was going to Morocco the following month.
Make it plain that you are going back to Morocco later and it's no great drama for you, but it might be good for them with all of the cross border traffic etc. Don't say you need the Euro's else you can't do the rest of your trip etc ;-)
Make sure you leave Nouadhibou with most of your Dirhams gone BUT save 400 or so dirhams so that you have some money for the long leg back to Dahkla from the border if you are coming back that way. You might need it for gas, repairs or a nice meal at the very nice 'last petrol station' cafe.
I think taking dirhams out of Morocco is not allowed so bare that in mind. Hope that helps.
If your going to Mali, I managed 3 months there just withdrawing CFA's from the few cash machines they have - Kayes and Bamako have them, else banks that do 'Visa Electron' can do it inside.