Added by daviddavis almost 2 years ago
Fixed bug where path wasn't used and module_dir was set to non-directory
There were two bugs here at play. First the code wasn't using the full path including extraction_dir when checking if the module file was a directory and secondly, the loop meant that module_dir could be set to a file if it didn't find a directory.
Also, fixed some flake8 errors.