Several tests had memory leaks. As well found a few leaks within the importer and resolver areas.
Files can be refered to directly using their hash, or the hash of their directory and the file name.