Do not try to format the module directory if module == 'core'.
Merge pull request #2134 from cmfcmf/fix-img

Do not try to format the module directory if module == 'core'.