Now removes any duplicates that it finds when searching using xpath.

Added dedup function to mechanic.js array class, and used that to remove found duplicates in xpath searches.