Hi, you will love Marrakesh. I have been back from 5 nights there over Christmas, with my DH and our two 2DSs (3 and 1) and honestly, you will be fine there.
The Royal Mirage will be a great place to stay, out of the Medina, so away from the "poor" bits, but you will still be able to go the square (as a pp said, a must at night), and the markets. We stayed in the old town, and there were times when it honestly wasn't enjoyable with the two DSs - think dusty, narrow streets, with motorbikes whizzy by!
It is safe though. While I felt a bit stressed with the motorbikes going by, especially in the markets, I never felt threatened ( I am blond, and so is DS1). My biggest worry was one of us getting run over by a moped!
I didn't go to any special effort to "cover up" - just wore jeans and a shirt. Unless you are a Muslim, you will not be allowed to enter the main mosque (Koutoubia), don't know about any others (didn't try). Some women did cover up, but it is very touristy so you will really not stick out too much.
Your trip sounds like a lot of fun, I would honestly say while you need to keeps your wits about you (as you would anywhere) it really is not unsafe.