some fixes

made the script working in PS 2.0
-Raw parameter is introduced in 3.0
Improved regex for Target tag because it does not always match it