fixed powershell 2.0 compatibility
improved regex for Target tag
Merge pull request #2 from MadBender/master

some fixes