a very hacked together method of determining 'dirty' files, various tweaks and fixes