Refactor python/tidy.py (updated post-cargoify)

- Removed a global that was used to store state.
- Gathered license checking logic into one file.
- Removed some redundant exceptions.
- Files with errors are now shown as relative paths.