Check for a valid extension when loading commands

Some systems might create some hidden files (like `.DS_Store` files under Mac OS X), causing the script to fail.

Commands can now be deactivated by changing the extension.