If Scooby-Doo has taught us nothing, it's that you fight fire with fire. Have the PCs dress up a ghost themselves (for that scenario) and scare the goblins away. A nice skill challenge to pull this off, fight a few stragglers, and everyone has a good laugh at the end.