Is this safe? 2 wires to 1 screw
No, it is not safe.  That screw terminal is made to take just one wire.  Since it doesn't use the switch as it's intended (by its UL listing) it's a code violation.  It will make a poor connection, which can heat up and potentially cause a fire.  

As long as there's room in the box, it can be corrected by pigtailing.  You would connect one end of a new short section of wire (the "pigtail") to the terminal screw, and splice the two wires on the screw and the other end of the pigtail.  

Very basic task for an electrician, doable for a DIY that knows the basics of working safely with electrical.