We need to run on a directory since shell files might have no extension. There are few shell files, so speed should not be an issue. Fixes #1166.