Try going on ebay to buy cah before you go, lots more people are going to Morocco now, and come back with cash. Might give you enough to get you to the first ATM, pplus you can get a good deal sometimes on the exchange rate. You will need cash if you are going on the motorway network.
ATMs are all over the country, but you tend to be limited to taking out 2000 dirhams at a time. The fees charged are for each transaction, so take out larger lumps if you can as it saves on transaction fees.