Improvments to the shell script for extensions

Only iterate directories, and avoid the ckan folder to prevent havoc