As a general code tidy up, at some point it would be good to switch from using os.path and glob to instead using pathlib where possible. This is low-priority.
os.path
glob
pathlib