Is exceeding Opamp Common Mode Voltage safe?
A few op-amps allow the supply rails to be exceeded without damage. Many require the inputs to remain within the supply rails (or no more than a few hundred mV outside, or current limited). It really depends on the op-amp. Read the abs. max ratings for what might damage the op-amp even if momentarily exceeded. Read the recommended ratings for what to do in normal operation. Note that the ratings apply even when no supply voltage is applied. 

For example, with the ubiquitous LM358/LM324 op-amp you can exceed the positive rail (up to 32V) but going more than a few hundred mV below the negative rail can destroy the chip. Most CMOS op-amps eg. TLC27L2 do not allow either supply rail to be exceeded by more than a few hundred mV. Sometimes 0mV is specified. 

If you exceed the common mode range, you cannot expect the op-amp to behave properly (though it might in some cases). As you noted in some cases the output will go to the opposite rail than expected, which can cause some poorly-designed circuits to latch up. Also note that you should use "worst case" common mode range, which means not just using the worst case figures on the datasheet, but also allowing for temperature if that is not accounted for. For example, the LM324 has a common mode range that includes 0V to V+ -1.5V worst case, but only at 25°C. The manufacturer has not seen fit to grace us with even typical characteristics of Vcm with temperature, but a quick glance at the schematic would tend to indicate that low temperatures will be worse, by at least 4mV/°C, so one might allow V+ -2V (and verify at least typical characteristics in a test chamber if low temperature operation is required).