merged latest lwf.

* Fix attachLWF with detached lwf instance
* Fix generate colored image with rotated image in atlas
merged more lua support and fixed wrong args for FileUtils.cp().