Don't add . and .. directories to the dynamic module list

This was creating a recursive module directory structure,
which may have unexpected results.