Improving script for reporting deprecation

The current script assumed a snapshot of the code that may not exist.
Instead, the script is now smarter in determining what files have
deprecations.