Added AMD support, added value checking of translation in cases where sc...

Added AMD support, added value checking of translation in cases where scaleX and scaleY produce NaN or Infinity values.

Maybe checks should be done on other properties, but these are the only ones I have needed so far to avoid inserting invalid transform attributes.