Fix for #440, #439, #438

I made some changes to the "tools/command/mirror.as" and the "tools/utils/GeomUtil.as" to eliminate the bugs reported in issues #440, #439, #438.

This is my first Commit to another Repo than my own, so i hope i am doing this the right way.