Added logging for corrupted modules

Log when a module in the module dir isn't readable, or contains no
metadata file
Allow arbitrarily deep module directories.

Support having module directories that are organised by in
subdirectories, to make them more maintainable.
Minor refactor
Don't change directories when interacting with Git

Problems occur when changing directories on multiple threads.