Arduino IDE uses 'old'/cached version of libraries

Jumboman:
I could change the content of NewPing.pde to $@##@something@@ and it still wouldn't change the behaviour.

What file is this?

If you want to find out whether a file you're looking at is actually being used, temporarily rename it and try building again. If the build still succeeds then presumably it is using some other copy, and you could carry out a file system search to find that other copy.